Compare commits

...

1 Commits

Author SHA1 Message Date
BOHUNG 34b4187716 finish reset_btn and set a submit_btn 2019-11-22 17:43:39 +08:00
2 changed files with 238 additions and 9 deletions

View File

@ -3026,7 +3026,7 @@ if (typeof Math.imul == "undefined" || (Math.imul(0xffffffff, 5) == 0)) {
QG(function (a) { return Y(IW.c ? IW.c(a) : IW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "treatments-received-panel"); QG(function (a) { return Y(IW.c ? IW.c(a) : IW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "treatments-received-panel");
QG(function () { return React.createElement("div", { id: "patient-related-help" }, React.createElement("h1", null, "Patient related factors"), React.createElement("h2", null, "<%=%>"), React.createElement("p", null, "Many risk factors depend on the age of the patient."), React.createElement("h2", null, "Surgery", React.createElement("p", null, "May be breast-conserving surgery or a mastectomy."))) }, new R(null, 1, 5, S, [ZG], null), "patient-related-help"); QG(function () { return React.createElement("div", { id: "patient-related-help" }, React.createElement("h1", null, "Patient related factors"), React.createElement("h2", null, "<%=%>"), React.createElement("p", null, "Many risk factors depend on the age of the patient."), React.createElement("h2", null, "Surgery", React.createElement("p", null, "May be breast-conserving surgery or a mastectomy."))) }, new R(null, 1, 5, S, [ZG], null), "patient-related-help");
var JW = QG(function (a) { var JW = QG(function (a) {
var b = function () { var a = new m(null, 1, [nu, jW], null); return null/*nW.c ? nW.c(a) : nW.call(null, a) */}();/*important*/ return gg(React.createElement, "div", M(b) ? EG(b) : null, M(b) ? new R(null, 1, 5, S, [React.createElement("form", { onKeyPress: GW, onSubmit: HW, className: "form-horizontal" }, Y(p(a.c ? a.c(fn) : a.call(null, fn)) ? new R(null, 3, 5, S, [bv, function () { var a = new m(null, 2, [Lx, "Age", hk, fn], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), new R(null, 3, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, "#686868", Aq, "145px", wr, -5], null)], var b = null;/*important*/ return gg(React.createElement, "div", M(b) ? EG(b) : null, M(b) ? new R(null, 1, 5, S, [React.createElement("form", { onKeyPress: GW, onSubmit: HW, className: "form-horizontal" }, Y(p(a.c ? a.c(fn) : a.call(null, fn)) ? new R(null, 3, 5, S, [bv, function () { var a = new m(null, 2, [Lx, "Age", hk, fn], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), new R(null, 3, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, "#686868", Aq, "145px", wr, -5], null)],
null), "Age must be between 25 and 85"], null)], null) : null), Y(B.h(Bm, bH(KQ(eo))) ? function () { var a = new m(null, 2, [Lx, "Post Menopausal", hk, Zk], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null))], null) : new R(null, 2, 5, S, [Y(b), React.createElement("form", { onKeyPress: GW, onSubmit: HW, className: "form-horizontal" }, Y(p(a.c ? a.c(fn) : a.call(null, fn)) ? new R(null, 3, 5, S, [bv, function () { var a = new m(null, 2, [Lx, "Age", hk, fn], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), new R(null, 3, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, null), "Age must be between 25 and 85"], null)], null) : null), Y(B.h(Bm, bH(KQ(eo))) ? function () { var a = new m(null, 2, [Lx, "Post Menopausal", hk, Zk], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null))], null) : new R(null, 2, 5, S, [Y(b), React.createElement("form", { onKeyPress: GW, onSubmit: HW, className: "form-horizontal" }, Y(p(a.c ? a.c(fn) : a.call(null, fn)) ? new R(null, 3, 5, S, [bv, function () { var a = new m(null, 2, [Lx, "Age", hk, fn], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), new R(null, 3, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn,
"#686868", Aq, "145px", wr, -5], null)], null), "Age must be between 25 and 85"], null)], null) : null), Y(B.h(Bm, bH(KQ(eo))) ? function () { var a = new m(null, 2, [Lx, "Post Menopausal", hk, Zk], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null))], null)) "#686868", Aq, "145px", wr, -5], null)], null), "Age must be between 25 and 85"], null)], null) : null), Y(B.h(Bm, bH(KQ(eo))) ? function () { var a = new m(null, 2, [Lx, "Post Menopausal", hk, Zk], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null))], null))
}, new R(null, 1, 5, S, [aH], null), "patient-related-form"), KW = QG(function (a) { return Y(JW.c ? JW.c(a) : JW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "patient-related-panel"), LW = QG(function (a) { }, new R(null, 1, 5, S, [aH], null), "patient-related-form"), KW = QG(function (a) { return Y(JW.c ? JW.c(a) : JW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "patient-related-panel"), LW = QG(function (a) {
@ -3044,14 +3044,15 @@ if (typeof Math.imul == "undefined" || (Math.imul(0xffffffff, 5) == 0)) {
null)], null) : null) , Y(p(a.c ? a.c(Tp) : a.call(null, Tp)) ? function () { var a = new m(null, 2, [Lx, "HER2 status", hk, Tp], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null), Y(p(a.c ? a.c(Br) : a.call(null, Br)) ? function () { var a = new m(null, 2, [Lx, "Detected by", hk, Br], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null), Y(B.h(ln, bH(KQ(Br))) ? new R(null, 4, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, "#686868", Aq, "145px", wr, -5], null)], null), "Detected as part of a preventive ", new R(null, 3, 5, S, [eF, new m(null, 2, [CE, "https://www.nhs.uk/conditions/nhs-screening/", $A, "_blank"], null), "screening programme"], null)], null) : null), Y(p(a.c ? null)], null) : null) , Y(p(a.c ? a.c(Tp) : a.call(null, Tp)) ? function () { var a = new m(null, 2, [Lx, "HER2 status", hk, Tp], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null), Y(p(a.c ? a.c(Br) : a.call(null, Br)) ? function () { var a = new m(null, 2, [Lx, "Detected by", hk, Br], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null), Y(B.h(ln, bH(KQ(Br))) ? new R(null, 4, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, "#686868", Aq, "145px", wr, -5], null)], null), "Detected as part of a preventive ", new R(null, 3, 5, S, [eF, new m(null, 2, [CE, "https://www.nhs.uk/conditions/nhs-screening/", $A, "_blank"], null), "screening programme"], null)], null) : null), Y(p(a.c ?
a.c(Pw) : a.call(null, Pw)) ? new R(null, 6, 5, S, [bv, function () { var a = new m(null, 2, [Lx, "Positive nodes", hk, Pw], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), function () { var a = new m(null, 2, [Lx, "Micrometastases only", hk, tC], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), ig("1", b) ? new R(null, 3, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, "#686868", Aq, "145px", wr, -5], null)], null), "Enabled when positive nodes is 1. "], null) : null, B.h("1", b) ? LW.c ? LW.c("“Yes” means the positive node has micrometastases only") : LW.call(null, a.c(Pw) : a.call(null, Pw)) ? new R(null, 6, 5, S, [bv, function () { var a = new m(null, 2, [Lx, "Positive nodes", hk, Pw], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), function () { var a = new m(null, 2, [Lx, "Micrometastases only", hk, tC], null); return LT.c ? LT.c(a) : LT.call(null, a) }(), ig("1", b) ? new R(null, 3, 5, S, [bv, new m(null, 1, [Ru, new m(null, 3, [Bn, "#686868", Aq, "145px", wr, -5], null)], null), "Enabled when positive nodes is 1. "], null) : null, B.h("1", b) ? LW.c ? LW.c("“Yes” means the positive node has micrometastases only") : LW.call(null,
"“Yes” means the positive node has micrometastases only") : null, B.h("0", b) ? LW.c ? LW.c("Why can't I enter micrometastases?") : LW.call(null, "Why can't I enter micrometastases?") : null], null) : null)) "“Yes” means the positive node has micrometastases only") : null, B.h("0", b) ? LW.c ? LW.c("Why can't I enter micrometastases?") : LW.call(null, "Why can't I enter micrometastases?") : null], null) : null))
}, new R(null, 2, 5, S, [aH, ZG], null), "tumour-related-form"), NW = QG(function (a) { return Y(MW.c ? MW.c(a) : MW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "tumour-related-panel"),reset_btn = QG(function (a) { a = null != a && (a.v & 64 || h === a.J) ? P(Fi, a) : a; a = y.h(a, nu);console.log(a);return React.createElement("button", { onClick: a, className: "btn navbar-btn btn-danger btn-lg screen-only" }, " Reset ") }, new R(null, 1, 5, S, [ZG], null), "clear-all-button"), OW = QG(function (a) { }, new R(null, 2, 5, S, [aH, ZG], null), "tumour-related-form"), NW = QG(function (a) { return Y(MW.c ? MW.c(a) : MW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "tumour-related-panel"),submit_btn = QG(function (a) { a = null != a && (a.v & 64 || h === a.J) ? P(Fi, a) : a; a = y.h(a, nu);return React.createElement("button", { onClick: function(){console.log(p(LG))}, className: "submit-btn screen-only",style:{marginLeft:'1em',float:'right',backgroundColor:"#d26900",color:"white",border:"0em",padding:"0.125em 0.5em",borderRadius:"0.5em"} }, " Submit ") }, new R(null, 1, 5, S, [ZG], null), "clear-all-button"),reset_btn = QG(function (a) { a = null != a && (a.v & 64 || h === a.J) ? P(Fi, a) : a; a = y.h(a, nu);return React.createElement("button", { onClick: a, className: "reset-btn screen-only",style:{float:'right',backgroundColor:"#d26900",color:"white",border:"0em",padding:"0.125em 0.5em",borderRadius:"0.5em"} }, " Reset ") }, new R(null, 1, 5, S, [ZG], null), "clear-all-button"), reset_call = QG(function (a) {
var b = function () { var a = new m(null, 1, [nu, jW], null); return reset_btn.c ? reset_btn.c(a) : reset_btn.call(null, a)}(),b1 = function () { var a = new m(null, 1, [nu, jW], null); return submit_btn.c ? submit_btn.c(a) : submit_btn.call(null, a)}();/*important*/ return gg(React.createElement, "div", M(b) ? EG(b) : null, [Y(b1),Y(b)])}), OW = QG(function (a) {
return React.createElement("form", { onKeyPress: GW, onSubmit: HW, className: "form-horizontal" },Y(p(a.c ? a.c(vu) : a.call(null, vu)) ? function () { var a = new m(null, 2, [Lx, "Size", hk, vu], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null), Y(p(a.c ? a.c(Qw) : a.call(null, Qw)) ? function () { return React.createElement("form", { onKeyPress: GW, onSubmit: HW, className: "form-horizontal" },Y(p(a.c ? a.c(vu) : a.call(null, vu)) ? function () { var a = new m(null, 2, [Lx, "Size", hk, vu], null); return LT.c ? LT.c(a) : LT.call(null, a) }() : null), Y(p(a.c ? a.c(Qw) : a.call(null, Qw)) ? function () {
var a = new m(null, 2, [Lx, "Grade", var a = new m(null, 2, [Lx, "Grade",
hk, Qw], null); return LT.c ? LT.c(a) : LT.call(null, a) hk, Qw], null); return LT.c ? LT.c(a) : LT.call(null, a)
}() : null)) }() : null))
}, new R(null, 1, 5, S, [ZG], null), "hormone-form"), PW = QG(function (a) { return Y(OW.c ? OW.c(a) : OW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "hormone-panel"), QW = QG(function () { }, new R(null, 1, 5, S, [ZG], null), "hormone-form"), PW = QG(function (a) { return Y(OW.c ? OW.c(a) : OW.call(null, a)) }, new R(null, 1, 5, S, [ZG], null), "hormone-panel"), QW = QG(function () {
var a = FW(); return React.createElement("div", { className: "row" }, React.createElement("div", { style: { paddingRight: 0 }, className: "col-sm-6 screen-only" }, Y(KW.c ? KW.c(a) : KW.call(null, a)), Y(PW.c ? PW.c(a) : PW.call(null, a))), React.createElement("div", { style: { paddingRight: 0 }, className: "col-sm-6 screen-only" }, Y(NW.c ? NW.c(a) : NW.call(null, var a = FW(); return React.createElement("div", { className: "row" }, React.createElement("div", { style: { paddingRight: 0 }, className: "col-sm-6 screen-only" }, Y(KW.c ? KW.c(a) : KW.call(null, a)), Y(PW.c ? PW.c(a) : PW.call(null, a))), React.createElement("div", { style: { paddingRight: 0 }, className: "col-sm-6 screen-only" }, Y(NW.c ? NW.c(a) : NW.call(null,
a))),React.createElement("div",{className: "col-sm-6 screen-only"},React.createElement("div",{},Y(reset_btn.l ? reset_btn.l() : reset_btn.call(null))))) a))))
}, new R(null, 2, 5, S, [aH, tU], null), "inputs-row"); QG(function () { var a = FW(); return React.createElement("div", { className: "row" }, React.createElement("div", { style: { paddingRight: 0 }, className: "col-sm-12" }, Y(KW.c ? KW.c(a) : KW.call(null, a)), Y(NW.c ? NW.c(a) : NW.call(null, a)), Y(PW.c ? PW.c(a) : PW.call(null, a)))) }, new R(null, 2, 5, S, [aH, tU], null), "inputs-column"); BT(fg(zT, T, new R(null, 2, 5, S, [new R(null, 2, 5, S, ["div", new m(null, 1, [Do, "12px"], null)], null), new R(null, 3, 5, S, [".treatments-header--G__28384", new m(null, 3, [dr, "rgba(255, 140, 0, 1) !important", Bn, "white !important", Do, "0.625em !important"], null), new R(null, 2, 5, S, ["form", new m(null, 1, [eC, "1px solid red"], null)], null)], null)], null)), "predict3.layout.treatments-panel", "treatments-style"); }, new R(null, 2, 5, S, [aH, tU], null), "inputs-row"); QG(function () { var a = FW(); return React.createElement("div", { className: "row" }, React.createElement("div", { style: { paddingRight: 0 }, className: "col-sm-12" }, Y(KW.c ? KW.c(a) : KW.call(null, a)), Y(NW.c ? NW.c(a) : NW.call(null, a)), Y(PW.c ? PW.c(a) : PW.call(null, a)))) }, new R(null, 2, 5, S, [aH, tU], null), "inputs-column"); BT(fg(zT, T, new R(null, 2, 5, S, [new R(null, 2, 5, S, ["div", new m(null, 1, [Do, "12px"], null)], null), new R(null, 3, 5, S, [".treatments-header--G__28384", new m(null, 3, [dr, "rgba(255, 140, 0, 1) !important", Bn, "white !important", Do, "0.625em !important"], null), new R(null, 2, 5, S, ["form", new m(null, 1, [eC, "1px solid red"], null)], null)], null)], null)), "predict3.layout.treatments-panel", "treatments-style");
BT(fg(zT, T, new R(null, 1, 5, S, [new R(null, 2, 5, S, [".closer--G__28387", new m(null, 1, [YD, "0.625em"], null)], null)], null)), "predict3.layout.treatments-panel", "treatment-input-style"); BT(fg(zT, T, new R(null, 1, 5, S, [new R(null, 2, 5, S, [".closer--G__28387", new m(null, 1, [YD, "0.625em"], null)], null)], null)), "predict3.layout.treatments-panel", "treatment-input-style");
var RW = QG(function (a, b) { var RW = QG(function (a, b) {
@ -3103,8 +3104,8 @@ if (typeof Math.imul == "undefined" || (Math.imul(0xffffffff, 5) == 0)) {
React.createElement("p", null, "Should ", React.createElement("strong", null, "bisphosphonates"), " be included as a treatment option in this tool? "), Y(OQ(eo)), React.createElement("p", null, "If bisphosphonates are not available as a treatment in your area, you may wish to remove this treatment\n option from the tool."), React.createElement("hr", null), React.createElement("p", null, "Should the tool cover ", React.createElement("strong", null, "10 or 15 years"), " from diagnosis?"), Y(OQ(lm)), React.createElement("hr", React.createElement("p", null, "Should ", React.createElement("strong", null, "bisphosphonates"), " be included as a treatment option in this tool? "), Y(OQ(eo)), React.createElement("p", null, "If bisphosphonates are not available as a treatment in your area, you may wish to remove this treatment\n option from the tool."), React.createElement("hr", null), React.createElement("p", null, "Should the tool cover ", React.createElement("strong", null, "10 or 15 years"), " from diagnosis?"), Y(OQ(lm)), React.createElement("hr",
null), React.createElement("p", null, "Which ", React.createElement("strong", null, "result tab"), " should appear first?"), Y(OQ(NB))), React.createElement("div", { className: "modal-footer" }, React.createElement("button", { type: "button", onClick: function () { return $("#settingsModal").modal("hide") }, className: "btn btn-default" }, "Close"))))) null), React.createElement("p", null, "Which ", React.createElement("strong", null, "result tab"), " should appear first?"), Y(OQ(NB))), React.createElement("div", { className: "modal-footer" }, React.createElement("button", { type: "button", onClick: function () { return $("#settingsModal").modal("hide") }, className: "btn btn-default" }, "Close")))))
}, new R(null, 1, 5, S, [aH], null), "settings-modal"); var $W = QG(function () { return Y(p(bH(FQ)) ? function () { sU("tool-postamble"); return new R(null, 4, 5, S, [gB, new m(null, 4, [ps, "button", nu, function () { return zQ.ma(null, "print") }, lC, function (a) { return B.h("Enter", a.nativeEvent.code) ? zQ.ma(null, "print") : null }, Ru, ni([Bn, Do, cp, dr, Fr, xt, $t, Gx, jy, xz, Uz], ["#ffffff", 16, 300, "#444466", 70, 10, 10, .5, "0.9375em 5px 0.9375em 5px", -1, "fixed"])], null), function () { var a = new m(null, 1, [Qm, DF], null); return XQ.h ? XQ.h(a, "print") : XQ.call(null, a, "print") }(), " Print"], null) }() : null) }, new R(null, }, new R(null, 1, 5, S, [aH], null), "settings-modal"); var $W = QG(function () { return Y(p(bH(FQ)) ? function () { sU("tool-postamble"); return new R(null, 4, 5, S, [gB, new m(null, 4, [ps, "button", nu, function () { return zQ.ma(null, "print") }, lC, function (a) { return B.h("Enter", a.nativeEvent.code) ? zQ.ma(null, "print") : null }, Ru, ni([Bn, Do, cp, dr, Fr, xt, $t, Gx, jy, xz, Uz], ["#ffffff", 16, 300, "#444466", 70, 10, 10, .5, "0.9375em 5px 0.9375em 5px", -1, "fixed"])], null), function () { var a = new m(null, 1, [Qm, DF], null); return XQ.h ? XQ.h(a, "print") : XQ.call(null, a, "print") }(), " Print"], null) }() : null) }, new R(null,
1, 5, S, [aH], null), "results-footer"), aX = QG(function () { 1, 5, S, [aH], null), "results-footer"),is_submit={flag: true , submit_func: function(){var a = bH(FQ);return (cc(E(a)) || null == a)}} , aX = QG(function () {
var a = bH(FQ); return cc(E(a)) || null == a ? React.createElement("div", { className: "row" }, React.createElement("div", { className: "col-sm-10 col-sm-offset-1 col-xs-12" }, React.createElement("div", { style: { backgroundColor: "#d3e7fd", padding: "0.625em 0.625em 3px 0.625em", marginBottom: 20 } }, React.createElement("div", { style: { color: "#002e5d", fontSize: "1.25em" } }, React.createElement("p", { style: { paddingBottom: 0 } }, Y(function () { var a = bH(FQ); console.log(cc(E(a)) || null == a);return is_submit.flag ? React.createElement("div", { className: "row" }, React.createElement("div", { className: "col-sm-10 col-sm-offset-1 col-xs-12" }, React.createElement("div", { style: { backgroundColor: "#d3e7fd", padding: "0.625em 0.625em 3px 0.625em", marginBottom: 20 } }, React.createElement("div", { style: { color: "#002e5d", fontSize: "1.25em" } }, React.createElement("p", { style: { paddingBottom: 0 } }, Y(function () {
var a = new m(null, 2, [Qm, DF, Ru, new m(null, 2, [Do, 35, iu, 8], var a = new m(null, 2, [Qm, DF, Ru, new m(null, 2, [Do, 35, iu, 8],
null)], null); return XQ.h ? XQ.h(a, "info-circle") : XQ.call(null, a, "info-circle") null)], null); return XQ.h ? XQ.h(a, "info-circle") : XQ.call(null, a, "info-circle")
}()), " Treatment options and results will appear here when you have filled in all the information needed above."))))) : React.createElement("div", null, React.createElement("div", { className: "row" }, React.createElement("div", { className: "col-md-6 clearfix" }, React.createElement("h3", null, "Treatment Options"), Y(VW.l ? VW.l() : VW.call(null))), function () { }()), " Treatment options and results will appear here when you have filled in all the information needed above."))))) : React.createElement("div", null, React.createElement("div", { className: "row" }, React.createElement("div", { className: "col-md-6 clearfix" }, React.createElement("h3", null, "Treatment Options"), Y(VW.l ? VW.l() : VW.call(null))), function () {
@ -3117,10 +3118,8 @@ if (typeof Math.imul == "undefined" || (Math.imul(0xffffffff, 5) == 0)) {
React.createElement("div", { key: 2, className: "row" }, React.createElement("div", { style: { marginBottom: 20 }, className: "col-xs-12" }, Y(QW.l ? QW.l() : QW.call(null)))))), React.createElement("div", { className: "row screen-only" }, React.createElement("div", { style: { backgroundColor: "#ffffff" }, className: "col-sm-12" }, React.createElement("div", { key: 3, className: "row" }, React.createElement("div", { key: 2, className: "col-sm-10 col-sm-offset-1" }, Y(aX.l ? aX.l() : aX.call(null)))))), Y(uU(0)), function () { React.createElement("div", { key: 2, className: "row" }, React.createElement("div", { style: { marginBottom: 20 }, className: "col-xs-12" }, Y(QW.l ? QW.l() : QW.call(null)))))), React.createElement("div", { className: "row screen-only" }, React.createElement("div", { style: { backgroundColor: "#ffffff" }, className: "col-sm-12" }, React.createElement("div", { key: 3, className: "row" }, React.createElement("div", { key: 2, className: "col-sm-10 col-sm-offset-1" }, Y(aX.l ? aX.l() : aX.call(null)))))), Y(uU(0)), function () {
var a = $W.l ? $W.l() : $W.call(null); var a = $W.l ? $W.l() : $W.call(null);
return gg(React.createElement, "div", M(a) ? EG(rG(C([new m(null, 1, [Rx, new R(null, 1, 5, S, ["screen-only"], null)], null), a]))) : { className: "screen-only" }, M(a) ? new R(null, 1, 5, S, [null], null) : new R(null, 2, 5, S, [Y(a)], null)) return gg(React.createElement, "div", M(a) ? EG(rG(C([new m(null, 1, [Rx, new R(null, 1, 5, S, ["screen-only"], null)], null), a]))) : { className: "screen-only" }, M(a) ? new R(null, 1, 5, S, [null], null) : new R(null, 2, 5, S, [Y(a)], null))
}(), Y(WW.l ? WW.l() : WW.call(null)), Y(ZW.l ? ZW.l() : ZW.call(null)), Y(YW.l ? YW.l() : YW.call(null))], null) : new R(null, 9, 5, S, [Y(b), /*React.createElement("div", { id: "main-content", tabIndex: -1, style: { marginLeft: -30, marginRight: -30 }, className: "row" }, }(), Y(WW.l ? WW.l() : WW.call(null)), Y(ZW.l ? ZW.l() : ZW.call(null)), Y(YW.l ? YW.l() : YW.call(null))], null) : new R(null, 9, 5, S, [Y(b), React.createElement("div", { className: "row screen-only" }, React.createElement("div", { className: "col-md-10 col-md-offset-1" }, React.createElement("div", { key: 2, className: "row" }, React.createElement("div", { style: { marginBottom: 20 }, className: "col-xs-12" }, Y(QW.l ? QW.l() :
React.createElement("div", { className: "col-xs-12" }, React.createElement("div", { style: { position: "relative", width: "100%", backgroundColor: "#d3e7fd" } }, React.createElement("div", { style: { position: "absolute", width: "100%", top: 0, bottom: "20%", opacity: .25, background: "linear-gradient(rgba(255,255,255,0), #fff)" } }), React.createElement("div", QW.call(null)))))),React.createElement("div",{style:{clear:'both'}},reset_call.l ? reset_call.l() : reset_call.call(null))/*important ! here can add items under the form*/, React.createElement("div", { className: "row screen-only" }, React.createElement("div", { style: { backgroundColor: "#ffffff" }, className: "col-sm-12" }, React.createElement("div", { key: 3, className: "row" }, React.createElement("div", { key: 2, className: "col-sm-10 col-sm-offset-1" }, Y(aX.l ? aX.l() : aX.call(null)))))), Y(uU(0)), function () {
{ className: "row print-only" }, gg(React.createElement, "div", M(a) ? EG(rG(C([new m(null, 1, [Rx, new R(null, 2, 5, S, ["col-sm-10", "col-sm-offset-1"], null)], null), a]))) : { className: "col-sm-10 col-sm-offset-1" }, M(a) ? null : new R(null, 1, 5, S, [Y(a)], null)))))),*//*important*/ React.createElement("div", { className: "row screen-only" }, React.createElement("div", { className: "col-md-10 col-md-offset-1" }, React.createElement("div", { key: 2, className: "row" }, React.createElement("div", { style: { marginBottom: 20 }, className: "col-xs-12" }, Y(QW.l ? QW.l() :
QW.call(null)))))),React.createElement("div", { className: "row screen-only" },Y(reset_btn.l ? reset_btn.l() : reset_btn.call(null))), React.createElement("div", { className: "row screen-only" }, React.createElement("div", { style: { backgroundColor: "#ffffff" }, className: "col-sm-12" }, React.createElement("div", { key: 3, className: "row" }, React.createElement("div", { key: 2, className: "col-sm-10 col-sm-offset-1" }, Y(aX.l ? aX.l() : aX.call(null)))))), Y(uU(0)), function () {
var a = $W.l ? $W.l() : $W.call(null); return gg(React.createElement, "div", M(a) ? EG(rG(C([new m(null, 1, [Rx, new R(null, 1, 5, S, ["screen-only"], null)], null), a]))) : { className: "screen-only" }, var a = $W.l ? $W.l() : $W.call(null); return gg(React.createElement, "div", M(a) ? EG(rG(C([new m(null, 1, [Rx, new R(null, 1, 5, S, ["screen-only"], null)], null), a]))) : { className: "screen-only" },
M(a) ? null : new R(null, 2, 5, S, [/*print button*/Y(a)], null)) M(a) ? null : new R(null, 2, 5, S, [/*print button*/Y(a)], null))
}(), Y(WW.l ? WW.l() : WW.call(null)), Y(ZW.l ? ZW.l() : ZW.call(null)), Y(YW.l ? YW.l() : YW.call(null))], null)) }(), Y(WW.l ? WW.l() : WW.call(null)), Y(ZW.l ? ZW.l() : ZW.call(null)), Y(YW.l ? YW.l() : YW.call(null))], null))

230
index.html.erb Normal file
View File

@ -0,0 +1,230 @@
<% if params[:is_frontend_view] == "true" %>
<% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
<% else %>
<%= stylesheet_link_tag "basic/icon" %>
<%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
<% end %>
<div id="orbit-bar">
<% if current_user.nil? %>
<label for="open-orbit-login" style="display:none;">Open login</label>
<input type="checkbox" title="open login" id="open-orbit-login">
<label for="open-orbit-login" class="cover"></label>
<div class="login-window">
<div class="login-header">
<label for="open-orbit-login" class="close">×</label>
<h3><%= t(:login_orbit) %></h3>
</div>
<div class="login-body">
<%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
<div class="prepend input-group">
<span class="add input-group-addon"><i class="icon-user"></i></span>
<label for="user_user_id" style="display:none;">Username</label>
<input class="input" id="user_user_id" title="username" name="user_name" placeholder="<%= t("users.user_id") %>" size="30" title="username" type="text">
</div>
<div class="prepend input-group">
<span class="add input-group-addon"><i class="icon-lock"></i></span>
<label for="user_password" style="display:none;">Password</label>
<input class="input" id="user_password" name="password" placeholder="<%= t(:password) %>" title="password" size="30" type="password">
</div>
<div class="login-submit-wrap">
<div class="submit">
<button class="login-btn" type="submit"><%= t(:login) %></button>
</div>
<% if current_site.google_oauth_enabled %>
<div class="google-login">
<a class="login-btn" href="/auth/google_oauth2">
<i class="fa fa-google-plus"></i> Sign in
</a>
</div>
<% end %>
</div>
<% if !current_site.sign_up_roles.empty? %>
<div class="login-sign-up-btn"><a href="/users/new" rel="nofollow">Sign up now</a></div>
<% end %>
<% end %>
</div>
</div>
<% end %>
<input type="checkbox" id="open-orbit-nav" title="orbitbar">
<div class="orbit-bar-inner">
<label for="open-orbit-nav">
<i class="icons-list-2"></i>
</label>
<h2 class="orbit-bar-title">
<a href="/"><%= current_site.mobile_orbit_bar_title.nil? || current_site.mobile_orbit_bar_title == "" ? "Orbit" : current_site.mobile_orbit_bar_title %></a>
</h2>
<ul class="orbit-bar-menu">
<li>
<span class="orbit-bar-logo">
<img src="<%= current_site.default_image.url.nil? ? '/assets/orbit-logo.png' : current_site.default_image.url %>" alt="Orbit Bar Logo" />
</span>
<% if !current_user.nil? %>
<ul>
<li>
<a href="/<%= locale.to_s %>/admin/dashboards">
<i class="icons-gauge"></i> <%= t(:dashboard_) %>
</a>
</li>
<li>
<a href="/<%= locale.to_s %>/admin/members?at=thumbnail">
<i class="icons-users"></i> <%= t(:community_) %>
</a>
</li>
<% if current_user.is_admin? %>
<li class="divider"></li>
<li>
<a href="/<%= locale.to_s %>/admin/sites" tabindex="-1">
<i class="icons-cog"></i> <%= t(:settings) %>
</a>
</li>
<% end %>
</ul>
<% end %>
</li>
<li>
<a href="/" class="orbit-bar-home">
<i class="icons-house"></i>
</a>
</li>
<% if !current_user.nil? && current_user.is_admin? && TicketStatus.unread.count > 0 %>
<li>
<a href="/admin/sites" class="orbit-bar-notification">
<i class="icons-mail"></i>
</a>
</li>
<% end %>
</ul>
<ul class="link1" style="width: 240px;float: left;">
<li><a href="/">回首頁</a></li>
<li><a href="https://www.nccu.edu.tw/app/home.php">政治大學</a></li>
<li><a href="/zh_tw/sitemap">網站導覽</a></li>
</ul>
<ul class="orbit-bar-search-sign-language">
<%
google_search_cx = current_site.search['sitesearch'] rescue nil
is_google_seach_cx = google_search_cx =~ /^[0-9]+\:[0-9A-Za-z]+$/
if !google_search_cx.blank? and is_google_seach_cx
%>
<li>
<form id="search" method="get" action="http://www.google.com/cse" target="_blank">
<input type="hidden" name="cx" value="<%= google_search_cx %>">
<label style="display:none;" for="q">Google Search</label>
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => '', :title => "search"} %>
</form>
</li>
<%
else
if !google_search_cx.blank? and !is_google_seach_cx
search_domain = google_search_cx
else
search_domain = request.host_with_port
end
%>
<li>
<form id="search" method="get" action="http://www.google.com/custom" target="_blank">
<input type="hidden" name="client" value="pub-&amp" />
<input type="hidden" name="ie" id="ie" value="utf-8" />
<input type="hidden" name="oe" id="oe" value="utf-8" />
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
<input type='hidden' name='domains' value='<%= search_domain %>'>
<input type='hidden' name='sitesearch' value='<%= search_domain %>'>
<label style="display:none;" for="q">Google Search</label>
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => '', :title => "search"} %>
</form>
</li>
<% end %>
<li>
<% if current_site.enable_language_options %>
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
<% zh_cn_added = 0 %>
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
<span id="language"><i class="icons-earth orbit-bar-language-icon"></i><span class="orbit-bar-language-text">Language</span></span>
<ul>
<% @site_in_use_locales.each do |l| %>
<%
case l
when :en
accesskey = "e"
when :zh_tw
accesskey = "t"
end
%>
<% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
</li>
<% else %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<a accesskey="<%= accesskey %>" href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
</li>
<% end %>
<% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
<% zh_cn_added = 1 %>
<% accesskey = "s" %>
<% if locale == :zh_cn %>
<li class="active">
<%= t(:zh_cn, :locale => :zh_tw) %>
</li>
<% else %>
<li>
<a accesskey="<%= accesskey %>" href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
</li>
<% end %>
<% end %>
<% end %>
</ul>
<% end %>
<% end %>
</li>
<% if !current_user.nil? %>
<li>
<span id="user"><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name rescue nil %></span>
<ul>
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' rescue nil%></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' rescue nil %></li>
<% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
<li>
<% if params[:editmode] == "on" %>
<a tabindex="-1" href="<%= request.fullpath.split("?").first %>" style="color:red;"><i class="icons-bolt"></i>Edit Mode Off</a>
<% else %>
<a tabindex="-1" href="<%= request.fullpath + "#{(request.query_parameters.empty? ? "?" : "&")}editmode=on" %>"><i class="icons-bolt"></i>Edit Mode On</a>
<% end %>
</li>
<% end %>
<li>
<a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a>
</li>
</ul>
</li>
<% else %>
<li>
<a id="accesskey_login" class="sr-only" accesskey="L" href="/<%= "#{locale.to_s}" %>/accesskey" title="Login">:::</a>
<label for="open-orbit-login">
<i class="icons-login"></i>
</label>
</li>
<% end %>
</ul>
</div>
</div>
<script type="text/javascript">
$("#open-orbit-login").on("change",function(){
if($(this).is(":checked")){
$("#user_user_id").focus();
}
})
$(".login-body form").on("submit",function(){
$(this).append("<input type='hidden' name='referer_url' value='<%= request.original_url %>'/>");
})
<%
for_js = @site_in_use_locales.map{|l| l.to_s}
for_js << "zh_cn" if current_site.enable_zh_cn
%>
var I18n = {
get locale(){ return "<%= (session[:locale] == 'zh_tw' ? (session[:zh_cn] ? 'zh_cn' : 'zh_tw' ) : session[:locale]) %>"},
get validLocales(){return <%= for_js.to_json.html_safe %>},
set locale(v){return false},
set validLocales(v){return false}
};
</script>