[pLog-svn] r2774 - plog/trunk/js/ui
mark at devel.lifetype.net
mark at devel.lifetype.net
Thu Jan 12 13:37:33 GMT 2006
Author: mark
Date: 2006-01-12 13:37:33 +0000 (Thu, 12 Jan 2006)
New Revision: 2774
Modified:
plog/trunk/js/ui/plogui.js
Log:
Add the onLoading message and disable "add" button when we add the article category through ajax.
ToDo: Multi-Language messages upport in ajax onXXXXX()! We need a good way here, or we have to declare the message through var xxmessage = {$locale->tr("xxxx")} in newpost/editpost first... , it just weird.
Modified: plog/trunk/js/ui/plogui.js
===================================================================
--- plog/trunk/js/ui/plogui.js 2006-01-12 13:09:17 UTC (rev 2773)
+++ plog/trunk/js/ui/plogui.js 2006-01-12 13:37:33 UTC (rev 2774)
@@ -72,7 +72,7 @@
var params = 'op=addArticleCategoryAjax' + '&categoryName=' + encodeURIComponent(categoryName);
var myAjax = new Ajax.Request(
url,
- {method: 'get', parameters: params, onComplete: addArticleCategoryOption}
+ {method: 'get', parameters: params, onComplete: addArticleCategoryOption, onLoading: showArticleCategorySavingStatus }
);
}
}
@@ -100,9 +100,15 @@
}
$( 'postCategories' ).options[0].selected = true;
$( 'newArticleCategory' ).value = '';
+ $( 'addArticleCategory' ).disabled = 0;
}
}
+function showArticleCategorySavingStatus(originalRequest) {
+ $( 'newArticleCategory' ).value = 'Saving ...';
+ $( 'addArticleCategory' ).disabled = 1;
+}
+
/**
* this function is the one called when clicking the "add category" button
*/
More information about the pLog-svn
mailing list