Commit 55a86c81 authored by Klaus Wölfel's avatar Klaus Wölfel

USTUTT changes for "next" button

parent 9e5b8c81
...@@ -68,9 +68,10 @@ ...@@ -68,9 +68,10 @@
<div data-role="controlgroup" data-type="horizontal" class="ui-btn-right"> <div data-role="controlgroup" data-type="horizontal" class="ui-btn-right">
<a data-icon="forward" <a data-icon="forward"
class="next_step_link ui-btn ui-icon-forward ui-btn-icon-right">Next Step</a> class="next_step_link ui-btn ui-icon-forward ui-btn-icon-right">Continue</a>
<a data-icon="forward" <a data-icon="forward"
class="next_link ui-btn ui-icon-forward ui-btn-icon-right">Next</a> class="next_link ui-btn ui-icon-forward ui-btn-icon-right">Next</a>
</div> </div>
</header> </header>
......
...@@ -115,22 +115,43 @@ ...@@ -115,22 +115,43 @@
} }
function getNextStepLink(gadget, portal_type, options) { function getNextStepLink(gadget, portal_type, options) {
if (options.action === "view_machine_shift_spreadsheet") { //if (options.action === "view_machine_shift_spreadsheet") {
if (options.action === "view") {
var forward_kw = { var forward_kw = {
action: "view_run_simulation", action: "view_machine_shift_spreadsheet",
id: options.id id: options.id
}; };
return gadget.aq_pleasePublishMyState(forward_kw); return gadget.aq_pleasePublishMyState(forward_kw);
} }
else { else if (options.action === "view_machine_shift_spreadsheet") {
return false; var forward_kw1 = {
action: "view_operator_shift_spreadsheet",
id: options.id
};
return gadget.aq_pleasePublishMyState(forward_kw1);
}
else if (options.action === "view_operator_shift_spreadsheet") {
var forward_kw2 = {
action: "view_wip_spreadsheet",
id: options.id
};
return gadget.aq_pleasePublishMyState(forward_kw2);
}
else if (options.action === "view_wip_spreadsheet") {
var forward_kw3 = {
action: "view_run_simulation",
id: options.id
};
return gadget.aq_pleasePublishMyState(forward_kw3);
//else {
//return false;
} }
} }
function getTitle(gadget, portal_type, options) { function getTitle(gadget, portal_type, options) {
var title; var title;
if (portal_type === "Input Module") { if (portal_type === "Input Module") {
title = "Documents"; title = "Documentas";
} else if (portal_type === "Input") { } else if (portal_type === "Input") {
title = gadget.getDeclaredGadget("jio") title = gadget.getDeclaredGadget("jio")
.push(function (jio_gadget) { .push(function (jio_gadget) {
...@@ -501,19 +522,30 @@ ...@@ -501,19 +522,30 @@
.getElementsByClassName("next_step_link")[0]; .getElementsByClassName("next_step_link")[0];
$(button).hide(); $(button).hide();
var idle_timer; var idle_timer;
function resetTimer() { var stop_timer;
function resetTimer() {
clearTimeout(idle_timer); clearTimeout(idle_timer);
idle_timer = setTimeout(function () { $(button).show() }, idle_timer = setTimeout(function () { $(button).show() },
idle_seconds*1000); idle_seconds*1000);
} }
function hideButton() {
clearTimeout(stop_timer);
stop_timer = setTimeout(function () { $(button).hide() },
idle_seconds2*1000);
}
if (next_step_link !== false) { if (next_step_link !== false) {
button.href = next_step_link; button.href = next_step_link;
var idle_seconds = 10; var idle_seconds = 5;
$(document.body).on('keydown click', resetTimer); $(document.body).on('keydown click', resetTimer);
resetTimer(); var idle_seconds2 = 12;
$(document.body).on('keydown click', hideButton);
//resetTimer();
} }
else { else {
$(document.body).off('keydown click', resetTimer); $(document.body).off('keydown click', resetTimer);
} }
// XXX RenderJS hack to start sub gadget services // XXX RenderJS hack to start sub gadget services
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment