Commit 54ab3804a74d257e50943a4d7226e3ade8d2573e

Added new model, for People
  
391391 shp: this.model.get('shp')
392392 }));
393393 }
394
395 else if(type === 'people') {
396 var template = _.template($('#people-template').html());
397 $('#specific-content').html(template({
398 name: this.model.get('name'),
399 title: this.model.get('title'),
400 content: this.model.get('content')
401 // src: this.model.get('image')
402 }));
403 }
394404 },
395405 typeChanged: function(event) {
396406 var type = this.$select.val();
  
7070 }
7171 });
7272
73//Vijaynagara Hampi - Extending base type
74
75
76 var People = BaseType.extend({
77 defaults: _.extend({
78 name:"",
79 title:"",
80 content:""
81 // image:""
82
83 }, BaseType.prototype.defaults),
84 initialize: function() {
85 BaseType.prototype.initialize.call(this, arguments);
86 }
87 });
7388 // Plugin model can be used to load dynamic components
7489 // to the website by loading external JS files.
7590 // Also the website can be styled by using external CSS files,
238238 'plugin': Plugin,
239239 'map': Map,
240240 'Page': Page,
241 'Pages': Pages
241 'Pages': Pages,
242 'people': People
243
242244 };
243245
244246 //content types to render in content menu
245 M.contentTypes = ['text', 'image', 'video', 'table', 'plugin', 'map'];
247 M.contentTypes = ['text', 'image', 'video', 'table', 'plugin', 'map', 'people'];
246248
247249})(M);
  
282282 </div>
283283 </div>
284284 </script>
285 <script type="text/template" id="people-template">
286 <div class="contentview">
287 <form class="form-horizontal">
288 <div class="row">
289 <div class="form-group col-lg-6">
290 <label><b>Type</b></label>
291 <select class="form-control">
292 <% _.each(M.contentTypes, function(type) { %>
293 <option><%= type %></option>
294 <% }); %>
295 </select>
296 </div>
297 </div>
298 <div class="row">
299 <div class="form-group col-lg-6">
300 <div class="input-group">
301 <span class="input-group-addon"> <b>Name</b> </span>
302 <input class="form-control" type="text" placeholder="Name of the
303 Person" value="<%=
304 name %>" m-data-target="name">
305 </div>
306 </div>
307 </div>
308 <div class="row">
309 <div class="form-group col-lg-6">
310 <div class="input-group">
311 <span class="input-group-addon"> <strong>Title</strong> </span>
312 <input class="form-control" type="text" placeholder="Please
313 enter Title"
314 value="<%= title %>" m-data-target="title">
315 </div>
316 </div>
317 </div>
318 <div class="row">
319 <div class="form-group col-lg-6">
320 <div class="input-group">
321 <span class="input-group-addon"> <strong>Profile Image</strong> </span>
322 <input class="form-control" type="text" placeholder="Image URL"
323 value="<%= image %>" m-data-target="image">
324 </div>
325 </div>
326 </div>
327 </form>
328 <div class="row">
329 <div id="specific-content"></div>
330</script>
285331
286332 <script type="text/template" id="map-template">
287333 <div class="data">