mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Started to make filter list JavaScript reusable
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
* e107 Admin Helper
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_files/jslib/core/admin.js,v $
|
||||
* $Revision: 1.18 $
|
||||
* $Date: 2009-08-14 11:27:12 $
|
||||
* $Author: marj_nl_fr $
|
||||
* $Revision: 1.19 $
|
||||
* $Date: 2009-08-15 00:03:05 $
|
||||
* $Author: bugrain $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -302,3 +302,34 @@ e107Admin.AdminMenu = {
|
||||
|
||||
if(e107Admin.initRules.AdminMenu)
|
||||
document.observe( 'dom:loaded', function() { e107Admin.AdminMenu.init() });
|
||||
|
||||
|
||||
|
||||
|
||||
//TODO find the right place for this and make generic - wanted it out of download plugin for now
|
||||
e107.runOnLoad(function(){
|
||||
$$('form.e-filter-form').each(function(f) {
|
||||
var el = f.select('input')[0];
|
||||
el.e107PreviousValue = el.getValue();
|
||||
el.observe('keyup', function(e) {
|
||||
var el = e.element();
|
||||
e.stop();
|
||||
if (el.getValue() != el.e107PreviousValue) {
|
||||
if (el.e107Timeout) {
|
||||
window.clearTimeout(el.e107Timeout);
|
||||
}
|
||||
el.e107PreviousValue = el.getValue();
|
||||
el.e107Timeout = window.setTimeout(function () {
|
||||
new e107Ajax.Updater('downloads-list', f.action, {
|
||||
method: 'post',
|
||||
parameters: { //send query parameters here
|
||||
'download_filter_list': 1,
|
||||
'download-search-text': el.getValue()
|
||||
},
|
||||
overlayPage: $(document.body)
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, document, false);
|
||||
|
Reference in New Issue
Block a user