applied maxim changes

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 4dc6465f51
commit 8724a01a71
  1. 12
      resources/library/interactivities/Train.wgt/js/lib/ubw-main.js
  2. 28
      resources/library/interactivities/Train.wgt/js/main.js
  3. 1
      resources/nonDistributed/Cadran.wgt/css/main.css
  4. 7
      resources/nonDistributed/Transformation.wgt/js/main.js

@ -70,6 +70,10 @@ function initAfterI18nMessagesLoaded(reload, templates, callbacks) {
$(input).change(function(){
var val = (isRadioOrcheckbox ? $(this).is(":checked") : $(this).val());
parameters.value(key, val);
if(key != "themes"){
parameters.value("show", "3");
app.reload();
}
});
})(input);
});
@ -79,6 +83,7 @@ function initAfterI18nMessagesLoaded(reload, templates, callbacks) {
app.onEdit = true;
$(document.body).addClass("onEdit");
if(callbacks.onEdit && typeof callbacks.onEdit === 'function') {
parameters.value("show", "1");
callbacks.onEdit(app);
}
});
@ -86,10 +91,12 @@ function initAfterI18nMessagesLoaded(reload, templates, callbacks) {
app.onEdit = false;
$(document.body).removeClass("onEdit");
if(callbacks.onView && typeof callbacks.onView === 'function') {
parameters.value("show", "2");
callbacks.onView(app);
}
});
$("button[role=reload]").click(function(){
parameters.value("show", "3");
app.reload();
});
$("button[role=help]").click(function(){
@ -133,7 +140,10 @@ var Parameters = (function(){
else {
log("Set parameter value ["+value+"] for key : ["+key+"]");
this.delegate.setPreference(key, value);
this.container.trigger("preferenceChange", {key: key, value: value});
this.container.trigger("preferenceChange", {
key: key,
value: value
});
}
}
}

@ -1,3 +1,5 @@
var just_a_flag = false;
function onTemplateLoadedCallback() {
}
@ -21,7 +23,20 @@ function reloadApp(app) {
var operator = app.parameters.value("operator");
var range = parseFloat(app.parameters.value("range"));
var count = parseInt(app.parameters.value("count"));
var show = app.parameters.value("show");
if(!just_a_flag){
just_a_flag = true;
show = "3";
}
switch(show){
case "1":
$("#labels div div").each(function(){
$(this).css("top","auto").css("left","auto")
})
break;
case "2":
break;
default:
$scene = $("#scene");
$scene.empty();
@ -71,13 +86,17 @@ function reloadApp(app) {
if(i != count-1) {
$("<div class='operator'>"+operator+"</div>").appendTo($drops);
}
};
}
$scene.droppable({
drop: function(event, ui) {
revert(ui.draggable);
}
});
break;
}
}
function reloadCallback(parameter) {
@ -91,5 +110,8 @@ $(document).ready(function(){
onEdit: reloadApp,
onView: reloadApp
};
init(reloadCallback, {toolbar: toolbarTemplate, parameters: parametersTemplate}, callbacks);
init(reloadCallback, {
toolbar: toolbarTemplate,
parameters: parametersTemplate
}, callbacks);
});

@ -132,6 +132,7 @@
position: relative;
overflow: hidden;
height: 100%;
width: 120px;
}
#result > div > div {
position: absolute;

@ -124,6 +124,8 @@ function reloadApp(app) {
for(var i=0 ; i<number ; i++) {
editcards.append(editRow(app, i));
}
if(window.sankore)
window.sankore.enableDropOnWidget(app.onEdit);
return;
}
@ -198,5 +200,8 @@ $(document).ready(function(){
onEdit: reloadApp,
onView: reloadApp
};
init(reloadCallback, {toolbar: toolbarTemplate, parameters: parametersTemplate}, callbacks);
init(reloadCallback, {
toolbar: toolbarTemplate,
parameters: parametersTemplate
}, callbacks);
});
Loading…
Cancel
Save