X-Git-Url: http://git.indexdata.com/?p=mkwsxb-moved-to-github.git;a=blobdiff_plain;f=mkwsbiblio%2Fmkwsbiblio%2Fstatic%2Fjs%2Fsettings.js;fp=mkwsbiblio%2Fmkwsbiblio%2Fstatic%2Fjs%2Fsettings.js;h=50de00268624bcc5ac3eb09560e2861934976c96;hp=f238e6ccf6f7253336f4e8f49ee36b104d08660d;hb=0fe33f3a7c8ec889087c80bed452c863ba907558;hpb=1118fce3fb78c8878dcd152399f7482e2b305071 diff --git a/mkwsbiblio/mkwsbiblio/static/js/settings.js b/mkwsbiblio/mkwsbiblio/static/js/settings.js index f238e6c..50de002 100644 --- a/mkwsbiblio/mkwsbiblio/static/js/settings.js +++ b/mkwsbiblio/mkwsbiblio/static/js/settings.js @@ -16,11 +16,9 @@ function program1(depth0,data) { if (helper = helpers.detailLinkId) { stack1 = helper.call(depth0, {hash:{},data:data}); } else { helper = (depth0 && depth0.detailLinkId); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; } buffer += escapeExpression(stack1) - + "\" onclick=\"$('#mkwsCurrentRecord').attr('autosearch', '"; - if (helper = helpers['md-title']) { stack1 = helper.call(depth0, {hash:{},data:data}); } - else { helper = (depth0 && depth0['md-title']); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; } - buffer += escapeExpression(stack1) - + "'); mkws.init('Click select', $('#mkwsCurrentRecordContainer'));\">\n "; + + "\" onclick=\" $('#mkwsCurrentRecord').attr('data-mkws-recid', '" + + escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.recid)),stack1 == null || stack1 === false ? stack1 : stack1[0])),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + + "'); $('#mkwsCurrentRecord').attr('autosearch', mkws.teams['BlockConfig'].query()); delete mkws.teams.ConfiguredRecord; mkws.init('Click select', '#mkwsCurrentRecordContainer'); return false;\">\n "; if (helper = helpers['md-title']) { stack1 = helper.call(depth0, {hash:{},data:data}); } else { helper = (depth0 && depth0['md-title']); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; } buffer += escapeExpression(stack1) @@ -76,19 +74,38 @@ function program6(depth0,data) { return buffer; }); })(); +(function() { + var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; +templates['EdxChosen'] = template(function (Handlebars,depth0,helpers,partials,data) { + this.compilerInfo = [4,'>= 1.0.0']; +helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; + var buffer = "", stack1, helper, functionType="function", escapeExpression=this.escapeExpression; + + + buffer += "Current selection: "; + if (helper = helpers['md-title']) { stack1 = helper.call(depth0, {hash:{},data:data}); } + else { helper = (depth0 && depth0['md-title']); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; } + buffer += escapeExpression(stack1) + + "\n"; + return buffer; + }); +})(); function MKWSBiblioSettings(runtime, element) { mkws.init("XBlock settings pane", "#settings-tab"); $(element).find('.save-button').bind('click', function() { var handlerUrl = runtime.handlerUrl(element, 'update_settings'); var data = { - query: $(element).find('#mkwsCurrentRecord').attr('autosearch') + query: mkws.teams["BlockConfig"].query(), + recid: $(element).find('#mkwsCurrentRecord').attr('data-mkws-recid') }; $.post(handlerUrl, JSON.stringify(data)).done(function(response) { window.location.reload(false); + return false; }); }); $(element).find('.cancel-button').bind('click', function() { runtime.notify('cancel', {}); + return false; }); -}; +}