git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@34 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2015-12-04 16:02:46 +00:00
parent 282ad76c48
commit 7c29b2d8b1
32 changed files with 10051 additions and 3807 deletions
+44
View File
@@ -0,0 +1,44 @@
define(['jquery', 'underscore', 'backbone', 'text!modules/debug/debugViewTemplate.html', 'modules/base/baseView', 'classes/debug'],
function ($, _, Backbone, debugViewTemplate, BaseView, Debug) {
var DebugView = BaseView.extend({
//initialize template
template: _.template(debugViewTemplate),
initialize: function () {
this.id = "DebugView";
DebugView.__super__.initialize.call(this);
},
events: {
"click #clearDebug": "clrDebugBtn"
},
onShowed:function(){
this.$el.find('#debugInfo').height(350);
},
clrDebugBtn: function(){
Debug.clearMessage();
this.$el.find('#debugInfo').val('');
},
//render the content into div of view
render: function () {
if (this.created === true)
{
//this.header.title = "pippo";
DebugView.__super__.render.call(this);
//this.el is the root element of Backbone.View. By default, it is a div.
//$el is cached jQuery object for the view's element.
//append the compiled template into view div container
this.$el.append(this.header.$el);
this.$el.append(this.template());
this.$el.append(this.footer.$el);
this.$el.find("#moreBtn").addClass("ui-btn-active");
}
this.$el.find('#debugInfo').val(Debug.readMessage());
//$("#homeBtn").addClass("ui-btn-active");
//return to enable chained calls
return this;
}
});
return DebugView;
});
+5
View File
@@ -0,0 +1,5 @@
<div data-role="content">
<h1>Messaggi Debug</h1>
<textarea id="debugInfo" rows="15" style="height: auto;"></textarea>
<button id="clearDebug">Cancella Messaggi Debug</button>
</div>