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

Updated officejs text editor to include history button.

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