diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2012-04-09 22:10:29 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2012-04-09 22:10:29 +0200 |
commit | b0894b314845a52e979539cbf1e6bd94444dca54 (patch) | |
tree | d5dee2664dac0806efe3d33fa4e2326e8e1dd82e /apps/files_versioning/js/settings.js | |
parent | 4fda6af725ea775750905983255ab3dc9ceeb2b9 (diff) | |
download | nextcloud-server-b0894b314845a52e979539cbf1e6bd94444dca54.tar.gz nextcloud-server-b0894b314845a52e979539cbf1e6bd94444dca54.zip |
Add Craigs granite library to 3rdparty and files_versioning. Still not working and lots ot stuff to do.
Diffstat (limited to 'apps/files_versioning/js/settings.js')
-rw-r--r-- | apps/files_versioning/js/settings.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/files_versioning/js/settings.js b/apps/files_versioning/js/settings.js new file mode 100644 index 00000000000..8dd13bac033 --- /dev/null +++ b/apps/files_versioning/js/settings.js @@ -0,0 +1,25 @@ +$(document).ready(function(){ + $('#file_versioning_head').chosen(); + + $.getJSON(OC.filePath('files_versioning', 'ajax', 'gethead.php'), function(jsondata, status) { + + if (jsondata.head == 'HEAD') { + // Most recent commit, do nothing + } else { + $("#file_versioning_head").val(jsondata.head); + // Trigger the chosen update call + // See http://harvesthq.github.com/chosen/ + $("#file_versioning_head").trigger("liszt:updated"); + } + }); + + $('#file_versioning_head').change(function() { + + var data = $(this).serialize(); + $.post( OC.filePath('files_versioning', 'ajax', 'sethead.php'), data, function(data){ + if(data == 'error'){ + console.log('Saving new HEAD failed'); + } + }); + }); +}); |