7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » including javascript file to popup dataobject_manager
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 678 Views |
-
including javascript file to popup dataobject_manager

8 March 2011 at 10:45pm
i want to add my own javascript file to dataobject_manager popup
in DataObject_Manager.php add
Requirements::javascript('dataobject_manager/javascript/test.js');
test.js
(function($) {
alert('start');
var option = $('#DataObjectManager_Popup_AddForm_FileID option:selected').text();
alert(option);
})(jQuery);the alert is shown when i reload the CMS but the next rules doesn't work
also this rule doesn't work too
$('.footer').css('background-color','#000');
.footer --> footer div of dataobject_manager popup
-
Re: including javascript file to popup dataobject_manager

10 March 2011 at 3:30am
I would think you'd put it in the getCMSFields() function for your dataobject, right? DataObjectManager is not the right controller for the popup.
| 678 Views | ||
|
Page:
1
|
Go to Top |

