- bookmarks OK
- flaglist DEV

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-10-30 18:11:20 +01:00
parent 8e956c857b
commit d77d7e5ef7
8 changed files with 446 additions and 0 deletions

5
js/materio_flag-ck.js Normal file

File diff suppressed because one or more lines are too long

36
js/materio_flag.js Normal file
View File

@@ -0,0 +1,36 @@
// @codekit-prepend "gui.js"
(function($) {
MaterioFlag = function(){
/**
* init()
*/
function init(){
trace('init MaterioFlag');
$(document).bind('flagGlobalAfterLinkUpdate', onFlaging);
};
function onFlaging(event){
trace('onFlaging', event);
$.getJSON('/materioflag/refresh/block/bookmarks', function(json){
trace('json', json);
$('#block-materio-flag-materio-flag-mybookmarks').replaceWith(json.block);
Drupal.flagLink('#block-materio-flag-materio-flag-mybookmarks');
// TODO: update flags stars on search results after unflaging from block
$.event.trigger('mybookmarks-block-updated');
});
};
init();
};
var materioflag = new MaterioFlag();
})(jQuery);