Merge branch 'develop' of git+ssh://git.sihnon.net/home/git/public/sihnon-js-lib into develop

This commit is contained in:
2012-01-22 01:11:31 +00:00

View File

@@ -41,7 +41,7 @@ var sf = {
]; ];
for (var module in modules) { for (var module in modules) {
sf[module].init(); sf[modules[module]].init();
} }
}, },
@@ -188,7 +188,7 @@ var sf = {
*/ */
init: function() { init: function() {
// Permanently configure the X to close the dialog // Permanently configure the X to close the dialog
$("#dialog-header-close").click(sf.dialog.close); $("#dialog-header-close").click(sf.ui.dialog.close);
}, },
/** /**
@@ -371,8 +371,7 @@ var sf = {
* Initialise module * Initialise module
*/ */
init: function() { init: function() {
// Update the content of the page on first load
sf.page.updateEvents($('#page_content'));
}, },
/** /**
@@ -488,16 +487,15 @@ var sf = {
* *
* @param names Names of the action(s) to execute * @param names Names of the action(s) to execute
* @param params Object containing action specific parameters * @param params Object containing action specific parameters
* @returns bool
*/ */
trigger: function(names, params) { trigger: function(names, params) {
if ( ! names instanceof Array) { if ( ! (names instanceof Array)) {
names = [names]; names = [names];
} }
for (var name in names) { for (var name in names) {
if (sf.actions.callbacks[name]) { if (sf.actions.callbacks[names[name]]) {
return sf.actions.callbacks[name](params); sf.actions.callbacks[names[name]](params);
} }
} }
}, },