Commit 096fb5d1 authored by Bryan Kaperick's avatar Bryan Kaperick

Updated officejs text editor to include history button.

parent e1620dac
......@@ -41,7 +41,6 @@
.declareMethod("render", function (options) {
var gadget = this,
child_gadget_url;
return gadget.jio_get(options.jio_key)
.push(function (result) {
......@@ -88,4 +87,4 @@
});
});
}(document, window, rJS));
\ No newline at end of file
}(document, window, rJS));
......@@ -227,7 +227,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.6016.61211.59613</string> </value>
<value> <string>968.63092.49502.60160</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>1524754712.51</float>
<float>1531834849.72</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -12,6 +12,8 @@
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_toggleRevisionOption",
"jio_toggleRevisionOption")
/////////////////////////////////////////////////////////////////
// declared methods
......@@ -67,7 +69,6 @@
.declareMethod("render", function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return RSVP.all([
......@@ -137,4 +138,4 @@
});
});
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP));
......@@ -256,7 +256,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>vincent</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.41210.1237.18158</string> </value>
<value> <string>968.63158.19596.29713</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1523022228.16</float>
<float>1531839117.64</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -20,44 +20,43 @@
/////////////////////////////////////////////////////////////////
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
return gadget.jio_toggleRevisionOption()
return gadget.jio_toggleRevisionOption(true)
.push(function () {
return gadget.jio_allDocs(param_list[0])
.push(function (result) {
var i, date, len = result.data.total_rows;
for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("modification_date")) {
date = new Date(result.data.rows[i].value.modification_date);
result.data.rows[i].value.modification_date = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
date_only: 0,
description: "The Date",
editable: 0,
hidden: 0,
hidden_day_is_last_day: 0,
"default": date.toUTCString(),
key: "modification_date",
required: 0,
timezone_style: 0,
title: "Modification Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
return gadget.jio_allDocs(param_list[0]);
})
.push(function (result) {
var i, date, len = result.data.total_rows;
for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("modification_date")) {
date = new Date(result.data.rows[i].value.modification_date);
result.data.rows[i].value.modification_date = {
field_gadget_param: {
allow_empty_time: 0,
ampm_time_style: 0,
css_class: "date_field",
date_only: 0,
description: "The Date",
editable: 0,
hidden: 0,
hidden_day_is_last_day: 0,
"default": date.toUTCString(),
key: "modification_date",
required: 0,
timezone_style: 0,
title: "Modification Date",
type: "DateTimeField"
}
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
return gadget.jio_toggleRevisionOption()
.push(function () {
return result;
});
});
});
}
.push(function () {
gadget.jio_toggleRevisionOption(false);
return result;
});
})
.allowPublicAcquisition('notifySubmit', function () {
return this.triggerSubmit();
......
......@@ -36,8 +36,11 @@
.declareAcquiredMethod('getSetting', 'getSetting')
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_toggleRevisionOption",
"jio_toggleRevisionOption")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
gadget.jio_toggleRevisionOption(false);
return this.jio_allDocs.apply(this, param_list)
.push(function (result) {
var i,
......@@ -119,4 +122,4 @@
});
});
}(window, RSVP, rJS));
\ No newline at end of file
}(window, RSVP, rJS));
......@@ -267,7 +267,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>959.44888.46554.50039</string> </value>
<value> <string>968.63157.4401.28006</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -285,7 +285,7 @@
</tuple>
<state>
<tuple>
<float>1498035961.94</float>
<float>1531838725.42</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value>
<value> <string>968.61786.19635.10274</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1501771018.12</float>
<float>1531816452.69</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.48398.15828.27938</string> </value>
<value> <string>968.44071.55411.42615</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,8 +254,8 @@
</tuple>
<state>
<tuple>
<float>1507880576.48</float>
<string>GMT+9</string>
<float>1530708459.0</float>
<string>UTC</string>
</tuple>
</state>
</object>
......
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