Merge pull request #1964 from owncloud/versions_cleanup

Versions cleanup
This commit is contained in:
Frank Karlitschek 2013-02-27 07:12:50 -08:00
commit fed39d0db2
5 changed files with 2 additions and 42 deletions

View File

@ -1,10 +0,0 @@
<?php
OCP\JSON::checkAppEnabled('files_versions');
OCP\JSON::checkAdminUser();
OCP\JSON::callCheck();
if (OCP\Config::getSystemValue('versions', 'true')=='true') {
OCP\Config::setSystemValue('versions', 'false');
} else {
OCP\Config::setSystemValue('versions', 'true');
}

View File

@ -4,8 +4,6 @@
OC::$CLASSPATH['OCA\Files_Versions\Storage'] = 'apps/files_versions/lib/versions.php'; OC::$CLASSPATH['OCA\Files_Versions\Storage'] = 'apps/files_versions/lib/versions.php';
OC::$CLASSPATH['OCA\Files_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php'; OC::$CLASSPATH['OCA\Files_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php';
OCP\App::registerAdmin('files_versions', 'settings');
OCP\Util::addscript('files_versions', 'versions'); OCP\Util::addscript('files_versions', 'versions');
// Listen to write signals // Listen to write signals

View File

@ -1,19 +1,9 @@
$(document).ready(function() {
$('#versions').bind('change', function() {
var checked = 1;
if (!this.checked) {
checked = 0;
}
$.post(OC.filePath('files_versions','ajax','togglesettings.php'), 'versions='+checked);
});
});
$(document).ready(function(){ $(document).ready(function(){
if (typeof FileActions !== 'undefined') { if (typeof FileActions !== 'undefined') {
// Add history button to 'files/index.php' // Add versions button to 'files/index.php'
FileActions.register( FileActions.register(
'file' 'file'
, t('files_versions', 'History') , t('files_versions', 'Versions')
, OC.PERMISSION_UPDATE , OC.PERMISSION_UPDATE
, function() { , function() {
// Specify icon for hitory button // Specify icon for hitory button

View File

@ -1,9 +0,0 @@
<?php
OCP\User::checkAdminUser();
OCP\Util::addscript( 'files_versions', 'versions' );
$tmpl = new OCP\Template( 'files_versions', 'settings');
return $tmpl->fetchPage();

View File

@ -1,9 +0,0 @@
<form id="versionssettings">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Files Versioning');?></strong></legend>
<input type="checkbox" name="versions" id="versions" value="1"
<?php if (OCP\Config::getSystemValue('versions', 'true')=='true')
echo ' checked="checked"';
?> /> <label for="versions"><?php echo $l->t('Enable'); ?></label> <br/>
</fieldset>
</form>