Commit 4f0c87d26f2c378b449954b6e02d92abffa6014c
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/editor.js
(8 / 1)
  | |||
326 | 326 | } | |
327 | 327 | } | |
328 | 328 | else if(type === 'image' || type === 'video' || | |
329 | type === 'audio' || type === 'plugin') { | ||
329 | type === 'audio') { | ||
330 | 330 | ||
331 | 331 | var template = _.template($('#media-template').html()); | |
332 | 332 | $('#specific-content').html(template({ | |
… | … | ||
337 | 337 | /*var view = new M.types.view[type]({model: this.model}); | |
338 | 338 | //$('#specific-content.preview').html(); | |
339 | 339 | view.render('.preview');*/ | |
340 | } | ||
341 | else if(type === 'plugin') { | ||
342 | var template = _.template($('#plugin-template').html()); | ||
343 | $('#specific-content').html(template({ | ||
344 | src: this.model.get('src'), | ||
345 | callback: this.model.get('callback') | ||
346 | })); | ||
340 | 347 | } | |
341 | 348 | else if(type === 'map') { | |
342 | 349 | var template = _.template($('#map-template').html()); |
mouchak/templates/editor.html
(25 / 0)
  | |||
288 | 288 | </div> | |
289 | 289 | </script> | |
290 | 290 | ||
291 | <script type="text/template" id="plugin-template"> | ||
292 | <div class="data"> | ||
293 | <div class="row"> | ||
294 | <div class="form-group col-lg-6"> | ||
295 | <div class="input-group"> | ||
296 | <span class="input-group-addon"><strong>path to file</strong></span> | ||
297 | <input class="form-control" type="text" placeholder="src" value="<%= src %>" | ||
298 | m-data-target="src"> | ||
299 | </div> | ||
300 | </div> | ||
301 | </div> | ||
302 | <div class="row"> | ||
303 | <div class="form-group col-lg-6"> | ||
304 | <div class="input-group"> | ||
305 | <span class="input-group-addon"><strong>callback</strong></span> | ||
306 | <input class="form-control" type="text" placeholder= | ||
307 | "callback function for js plugin" value="<%= callback %>" | ||
308 | m-data-target="callback"> | ||
309 | </div> | ||
310 | </div> | ||
311 | </div> | ||
312 | <div class="preview"></div> | ||
313 | </div> | ||
314 | </script> | ||
315 | |||
291 | 316 | <script type="text/template" id="text-template"> | |
292 | 317 | <div class="data"> | |
293 | 318 | <div class="edit-type-wrap"> |