Merge pull request #1964 from owncloud/versions_cleanup
Versions cleanup
This commit is contained in:
commit
fed39d0db2
|
@ -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');
|
|
||||||
}
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
OCP\User::checkAdminUser();
|
|
||||||
|
|
||||||
OCP\Util::addscript( 'files_versions', 'versions' );
|
|
||||||
|
|
||||||
$tmpl = new OCP\Template( 'files_versions', 'settings');
|
|
||||||
|
|
||||||
return $tmpl->fetchPage();
|
|
|
@ -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>
|
|
Loading…
Reference in New Issue