Commit 2998a3dbf63e3f61cae27745a7c1375951901a03

  • avatar
  • arvind
  • Mon Jul 22 14:52:18 IST 2013
Bug fixes:
  - Closing ticket #5 http://trac.pantoto.org/mouchak/ticket/5.
	- Custom menu interface was not checking if the option for custom menu was checked or not.  Fixing that.
	- Adding virtualenv entries in .gitignore
.gitignore
(5 / 1)
  
1
21*.*~
32*.pyc
3# For virtual-env
4bin/
5lib/
6local/
7include/
  
257257 }));
258258 // init the wysiwig editor
259259 M.editor.wysiwig('#edit');
260 }
260 }
261261 else if(type === 'image' || type === 'video' || type === 'audio') {
262262 var template = _.template($('#media-template').html());
263263 $('#specific-content').html(template({
264264 src: this.model.get('src')
265265 }));
266
266
267267 //provide the users a preview
268268 /*var view = new M.types.view[type]({model: this.model});
269269 //$('#specific-content.preview').html();
359359 this.showMenuOptions(this.model.get('customMenu'));
360360 },
361361 saveMenu: function() {
362 //console.log('saving menu..');
362 console.log('saving menu..');
363363 // var menuHTML = $('#menu').val().trim();
364364 //this.model.set({'html': menuHTML});
365365 //console.log(this.model.toJSON());
366366 //alert('saveMenu called');
367 /*this.model.save({}, {
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}, {
368375 success: function(model, response) {
369376 console.log(model, response);
370377 },
371378 error: function(xhr, response) {
372379 }
373 });*/
380 });
374381 //alert('end of save menu');
375382 }
376383 });
  
2828 <div id="footer">
2929 </div>
3030 </div>
31
31
3232 <script>
3333 // initialize editor
3434 window.M = window.M || {};
5454 <div class="page">
5555 <div class="menu-config">
5656 <h4> Menu Config </h4>
57 <form class="form-horizontal">
57 <!-- <form class="form-horizontal"> -->
5858 <div class="control-group">
5959 <input id="custom-menu" type="checkbox">
6060 <span class=""><strong> Custom Menu </strong></span>
6161 </div>
62 <button id="updateMenu" type="submit" class="btn btn-primary pull-right"> Update </button>
62 <button id="updateMenu" class="btn btn-primary pull-right"> Update </button>
6363 <div class="clearfix"></div>
6464 <div class="menu-options" style="display: none;">
6565 <div class="control-group">
7474 <%= menu %>
7575 </div>
7676 </div>
77 </form>
77 <!-- </form> -->
7878 </div>
7979 </div>
8080 </script>
124124 <span class="add-on"> <strong>Children</strong> </span>
125125 <input id="children" type="text" placeholder="csv of child pages"
126126 value="<%= children %>">
127 </div>
127 </div>
128128 </div>
129129 <div class="control-group">
130130 <div class="input-prepend">
146146
147147 <script type="text/template" id="content-list-template">
148148 <div class="content-item-wrapper">
149 <span class="content-item" id="content-<%= no %>">
150 <span class="label label-info"> <%= type %> </span>
151 <span class="">
149 <span class="content-item" id="content-<%= no %>">
150 <span class="label label-info"> <%= type %> </span>
151 <span class="">
152152 [ <small> <%= title %> <%= more %> </small> ]
153153 </span>
154154 </span>
173173 <span class="add-on"> <b>Title</b> </span>
174174 <input type="text" placeholder="title of the content" value="<%=
175175 title %>" m-data-target="title">
176 </div>
176 </div>
177177 </div>
178178 <div class="control-group">
179179 <div class="input-prepend">
180180 <span class="add-on"> <strong>Tags</strong> </span>
181181 <input type="text" placeholder="csv of tags for this content"
182182 value="<%= tags %>" m-data-target="tags">
183 </div>
183 </div>
184184 </div>
185185 </div>
186186 <div id="specific-content"></div>