| |   |
10 | 10 | 'click #addPage': 'addPage', |
11 | 11 | 'click .pagename .remove': 'removePage', |
12 | 12 | 'click #menu-config': 'showMenu', |
'click #footer-config': 'showFooterConfig' |
13 | 14 | }, |
14 | 15 | initialize: function() { |
15 | 16 | _.bindAll.apply(_, [this].concat(_.functions(this))); |
… | … | |
83 | 83 | M.editor.showOverlay(); |
84 | 84 | }, |
85 | 85 | showMenu: function(event) { |
event.preventDefault(); |
86 | 87 | this.menuconfigview.render(); |
return false; |
87 | 89 | }, |
showFooterConfig: function(event) { |
event.preventDefault(); |
//this.footerconfigview.render(); |
return false; |
}, |
88 | 95 | // validate the page list with menu order list |
89 | 96 | validate: function() { |
90 | 97 | //TODO: validate if the menu order list matches with the list of pages |
… | … | |
493 | 493 | this.$menuOrder.hide(); |
494 | 494 | $('#custom-menu').attr('checked', true); |
495 | 495 | this.$menuOptions.show({complete: function() { |
//M.editor.wysiwig('#menu'); |
M.editor.code.init('menu', 'html'); |
497 | 497 | }}); |
498 | 498 | } |
499 | 499 | }, |
… | … | |
501 | 501 | if(bool === true) { |
502 | 502 | this.$menuOrder.hide(); |
503 | 503 | this.$menuOptions.show({complete: function() { |
//M.editor.wysiwig('#menu'); |
M.editor.code.init('menu', 'html'); |
505 | 505 | }}); |
506 | 506 | } |
507 | 507 | else { |
… | … | |
522 | 522 | saveMenu: function() { |
523 | 523 | //console.log('saving menu..'); |
524 | 524 | if($('#custom-menu').is(':checked')) { |
var html = $('#menu').val().trim() || ''; |
//var html = $('#menu').val().trim() || ''; |
var html = M.editor.code.save('menu'); |
526 | 527 | this.model.set({'customMenu': true, 'html': html}); |
527 | 528 | } |
528 | 529 | else { |
… | … | |
547 | 547 | //alert('end of save menu'); |
548 | 548 | M.editor.showOverlay(); |
549 | 549 | } |
}); |
|
/* Footer Config View */ |
var FooterConfigView = Backbone.View.extend({ |
550 | 554 | }); |
551 | 555 | |
552 | 556 | /* Notification view */ |