Commit 9fff9f311ab6c5e51d053dd3a8b16c3721b63445

  • avatar
  • arvind
  • Wed Jul 31 16:42:26 IST 2013
Whitespace and indentation changes.
  
266266
267267 //provide the users a preview
268268 /*var view = new M.types.view[type]({model: this.model});
269 //$('#specific-content.preview').html();
270 view.render('.preview');*/
269 //$('#specific-content.preview').html();
270 view.render('.preview');*/
271271 }
272272 },
273273 typeChanged: function(event) {
339339 }
340340 },
341341 showMenuOptions: function(bool) {
342 if(bool === true) {
343 this.$menuOptions.show({complete: function() {
342 if(bool === true) {
343 this.$menuOptions.show({complete: function() {
344344 //M.editor.wysiwig('#menu');
345345 }});
346346 }
360360 },
361361 saveMenu: function() {
362362 console.log('saving menu..');
363 // var menuHTML = $('#menu').val().trim();
363 // var menuHTML = $('#menu').val().trim();
364364 //this.model.set({'html': menuHTML});
365365 //console.log(this.model.toJSON());
366366 //alert('saveMenu called');
367 var bool;
368 if($("custom-menu").is(":checked")){
369 bool = true;
370 }
371 else{
372 bool = false;
373 }
374 this.model.save({customMenu: bool}, {
367 var bool;
368 if($("custom-menu").is(":checked")) {
369 bool = true;
370 }
371 else {
372 bool = false;
373 }
374 this.model.save({customMenu: bool}, {
375375 success: function(model, response) {
376376 console.log(model, response);
377377 },
394394 },
395395 wysiwig: function($selector) {
396396 tinymce.init({
397 selector: $selector,
398 theme: 'modern',
399 height: 300,
400 plugins: ["advlist autolink link image lists charmap print preview hr",
401 "anchor pagebreak spellchecker searchreplace wordcount",
402 "visualblocks visualchars code fullscreen insertdatetime",
403 "media nonbreaking save table contextmenu directionality",
404 "emoticons template paste textcolor"
405 ],
406 toolbar: "undo redo | styleselect | bold italic | " +
407 "alignleft aligncenter alignright alignjustify | " +
408 "bullist numlist outdent indent | link image | " +
397 selector: $selector,
398 theme: 'modern',
399 height: 300,
400 plugins: ["advlist autolink link image lists charmap print preview hr",
401 "anchor pagebreak spellchecker searchreplace wordcount",
402 "visualblocks visualchars code fullscreen insertdatetime",
403 "media nonbreaking save table contextmenu directionality",
404 "emoticons template paste textcolor"
405 ],
406 toolbar: "undo redo | styleselect | bold italic | " +
407 "alignleft aligncenter alignright alignjustify | " +
408 "bullist numlist outdent indent | link image | " +
409409 "print preview media fullpage | forecolor backcolor emoticons"
410410 });
411411 }