git-svn-id: https://msi/svn/firstRepo/WebClient/branches/Manut_3.0.1@77 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2016-03-06 22:02:12 +00:00
parent 2e557160f9
commit 8ba6571a7b
8 changed files with 87 additions and 58 deletions
+44 -1
View File
@@ -6,10 +6,12 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
//initialize template
template:_.template(settingsViewTemplate),
_flagSave: false,
activateTab: 0,
initialize: function () {
initialize: function (tab) {
var self = this;
this.id = "SettingsView";
this.activateTab = tab;
SettingsView.__super__.initialize.call(this);
},
@@ -133,8 +135,45 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
});
}
},
onShowing: function (){
if (!Profile.isConnected()) {
$('h1').hide();
$('[data-role="tabs"]').hide();
$('#saveBtn').hide();
return;
}
if(this.activateTab === "1"){
var contents = this.$el.find('div[data-role="tabs"] > .ui-content');
var navbars = this.$el.find('div[data-role="navbar"] a');
$(contents[0]).hide();
$(navbars[0]).removeClass('ui-btn-active');
$(navbars[0]).removeClass('ui-state-persist');
$(contents[1]).show();
$(navbars[1]).addClass('ui-btn-active');
$(navbars[1]).addClass('ui-state-persist');
}
},
onShowed: function(){
var self = this;
if(this.activateTab === "1"){
var intervalID = setInterval(function(){
$('[for="spacc-PMChk"]').attr("style", "border: 4px red solid; border-style: dashed;");
}, 500);
var intervalID2 = setInterval(function(){
$('[for="spacc-PMChk"]').attr("style", "border: 4px red solid; border-style: solid;");
}, 1000);
setTimeout(function(){
clearInterval(intervalID);
clearInterval(intervalID2);
$('[for="spacc-PMChk"]').attr("style", "");
}, 5000);
}
if(Profile.data.isSpacc==="0"){
this.$el.find('#mapSpacc > :not(.ui-checkbox:has(#spacc-PMChk))').hide();
}
@@ -218,6 +257,10 @@ define(['jquery', 'underscore', 'backbone','text!modules/settings/settingsViewTe
this.$el.append(this.template());
this.$el.append(this.footer.$el);
}
var navbars = this.$el.find('div[data-role="navbar"] a');
$(navbars[0]).addClass('ui-btn-active');
$(navbars[0]).addClass('ui-state-persist');
this.$el.find('#nResult').val(Profile.data.risRic);
this.$el.find('#theme').val(Profile.data.tema);
@@ -60,6 +60,7 @@
<option value='ROMANIA'>Romania</option>
<option value='SLOVACCHIA'>Slovacchia</option>
<option value='SLOVENIA'>Slovenia</option>
<option value='SUDAFRICA'>SudAfrica</option>
<option value='SPAGNA'>Spagna</option>
<option value='USA'>Stati Uniti D'America</option>
<option value='SVEZIA'>Svezia</option>