diff --git a/files_w2g/appinfo/routes.php b/files_w2g/appinfo/routes.php deleted file mode 100644 index 9512e8f..0000000 --- a/files_w2g/appinfo/routes.php +++ /dev/null @@ -1,19 +0,0 @@ -create('files_w2g_ajax_getcolor', 'ajax/getcolor.php') - ->actionInclude('files_w2g/ajax/getcolor.php'); - -$this->create('files_w2g_ajax_core', 'ajax/workin2gether.php') - ->actionInclude('files_w2g/ajax/workin2gether.php'); - -$this->create('files_w2g_ajax_update', 'ajax/update.php') - ->actionInclude('files_w2g/ajax/update.php'); - -$this->create('files_w2g_ajax_admin_db', 'ajax/admin_db.php') - ->actionInclude('files_w2g/ajax/admin_db.php'); - -$this->create('files_w2g_admin', 'admin.php') - ->actionInclude('files_w2g/admin.php'); diff --git a/files_w2g/appinfo/version b/files_w2g/appinfo/version deleted file mode 100644 index e608a6e..0000000 --- a/files_w2g/appinfo/version +++ /dev/null @@ -1 +0,0 @@ -0.9.0.1 \ No newline at end of file diff --git a/files_w2g/admin.php b/workin2gether/admin.php similarity index 79% rename from files_w2g/admin.php rename to workin2gether/admin.php index 088f885..f9af085 100644 --- a/files_w2g/admin.php +++ b/workin2gether/admin.php @@ -1,6 +1,6 @@ execute(array($_POST['type']))->fetchAll(); if(count($result)>=1) echo $result[0]['configvalue']; diff --git a/files_w2g/ajax/update.php b/workin2gether/ajax/update.php similarity index 73% rename from files_w2g/ajax/update.php rename to workin2gether/ajax/update.php index e05b130..de26b31 100644 --- a/files_w2g/ajax/update.php +++ b/workin2gether/ajax/update.php @@ -1,6 +1,6 @@ getConfig()->getAppValue( 'files_w2g' , $mode , '[unset]' ); +$configvalue = \OC::$server->getConfig()->getAppValue( 'workin2gether' , $mode , '[unset]' ); if( $configvalue == '[unset]' )//Value already set? { - $query = \OCP\DB::prepare("INSERT INTO *PREFIX*appconfig(appid,configkey,configvalue) VALUES('files_w2g',?,?)"); + $query = \OCP\DB::prepare("INSERT INTO *PREFIX*appconfig(appid,configkey,configvalue) VALUES('workin2gether',?,?)"); $result = $query->execute(array($mode,$value)); echo $l->t($mode)." ".$l->t("has been set!"); } else { - $query = \OCP\DB::prepare("UPDATE *PREFIX*appconfig set configvalue=? WHERE appid='files_w2g' and configkey=?"); + $query = \OCP\DB::prepare("UPDATE *PREFIX*appconfig set configvalue=? WHERE appid='workin2gether' and configkey=?"); $result = $query->execute(array($value,$mode)); echo $l->t("Updated successfully!"); } diff --git a/files_w2g/ajax/workin2gether.php b/workin2gether/ajax/workin2gether.php similarity index 94% rename from files_w2g/ajax/workin2gether.php rename to workin2gether/ajax/workin2gether.php index 53d3917..ff6447d 100644 --- a/files_w2g/ajax/workin2gether.php +++ b/workin2gether/ajax/workin2gether.php @@ -1,14 +1,14 @@ execute(array($configtype))->fetchAll(); + $type = \OCP\DB::prepare("SELECT * FROM *PREFIX*appconfig where configkey=? and appid='workin2gether' LIMIT 1")->execute(array($configtype))->fetchAll(); if (count($type) >= 1) $configkey = $type[0]['configvalue']; diff --git a/files_w2g/appinfo/app.php b/workin2gether/appinfo/app.php similarity index 83% rename from files_w2g/appinfo/app.php rename to workin2gether/appinfo/app.php index ae6ccb0..629dd14 100644 --- a/files_w2g/appinfo/app.php +++ b/workin2gether/appinfo/app.php @@ -1,14 +1,14 @@ - files_w2g + workin2gether Workin2gether Visual locking of files and folders to contribute to a better collaboration + ]]> AGPL - Patrick Hoffmann - 0.9.1 - files_w2g + Patrick Hoffmann + 0.9.1.1 + workin2gether social 164016 diff --git a/workin2gether/appinfo/routes.php b/workin2gether/appinfo/routes.php new file mode 100644 index 0000000..dfde681 --- /dev/null +++ b/workin2gether/appinfo/routes.php @@ -0,0 +1,19 @@ +create('workin2gether_ajax_getcolor', 'ajax/getcolor.php') + ->actionInclude('workin2gether/ajax/getcolor.php'); + +$this->create('workin2gether_ajax_core', 'ajax/workin2gether.php') + ->actionInclude('workin2gether/ajax/workin2gether.php'); + +$this->create('workin2gether_ajax_update', 'ajax/update.php') + ->actionInclude('workin2gether/ajax/update.php'); + +$this->create('workin2gether_ajax_admin_db', 'ajax/admin_db.php') + ->actionInclude('workin2gether/ajax/admin_db.php'); + +$this->create('workin2gether_admin', 'admin.php') + ->actionInclude('workin2gether/admin.php'); diff --git a/workin2gether/appinfo/version b/workin2gether/appinfo/version new file mode 100644 index 0000000..270f48a --- /dev/null +++ b/workin2gether/appinfo/version @@ -0,0 +1 @@ +0.9.1.1 \ No newline at end of file diff --git a/files_w2g/css/styles.css b/workin2gether/css/styles.css similarity index 100% rename from files_w2g/css/styles.css rename to workin2gether/css/styles.css diff --git a/files_w2g/img/app.svg b/workin2gether/img/app.svg similarity index 100% rename from files_w2g/img/app.svg rename to workin2gether/img/app.svg diff --git a/files_w2g/img/lock.png b/workin2gether/img/lock.png similarity index 100% rename from files_w2g/img/lock.png rename to workin2gether/img/lock.png diff --git a/files_w2g/js/admin.js b/workin2gether/js/admin.js similarity index 75% rename from files_w2g/js/admin.js rename to workin2gether/js/admin.js index 4047a4e..a8e7b56 100644 --- a/files_w2g/js/admin.js +++ b/workin2gether/js/admin.js @@ -2,7 +2,7 @@ $(document).ready(function(){ $('#submitColor').click(function(){ $.ajax({ - url: OC.filePath('files_w2g','ajax','update.php'), + url: OC.filePath('workin2gether','ajax','update.php'), type: "post", data: { mode: 'color', value: $('#multicolor').val()}, async: false, @@ -13,7 +13,7 @@ $(document).ready(function(){ $('#submitfontcolor').click(function(){ $.ajax({ - url: OC.filePath('files_w2g','ajax','update.php'), + url: OC.filePath('workin2gether','ajax','update.php'), type: "post", data: { mode: 'fontcolor', value: $('#multifontcolor').val()}, async: false, @@ -24,7 +24,7 @@ $(document).ready(function(){ $('input:radio[name="suffix"]').change(function(){ $.ajax({ - url: OC.filePath('files_w2g','ajax','update.php'), + url: OC.filePath('workin2gether','ajax','update.php'), type: "post", data: { mode: 'suffix', value: $("input:radio[name='suffix']:checked").attr('id')}, async: false, @@ -35,18 +35,18 @@ $(document).ready(function(){ $('#clearall').click(function(){ $.ajax({ - url: OC.filePath('files_w2g','ajax','admin_db.php'), + url: OC.filePath('workin2gether','ajax','admin_db.php'), type: "post", data: { action: 'clearall'}, async: false, success: function(data){ - if(data=="clear") $('#lockfield').html(t("files_w2g","There are no locked files at the moment"));}, + if(data=="clear") $('#lockfield').html(t("workin2gether","There are no locked files at the moment"));}, }); }); $('#clearthis').click(function(){ $.ajax({ - url: OC.filePath('files_w2g','ajax','admin_db.php'), + url: OC.filePath('workin2gether','ajax','admin_db.php'), type: "post", data: { action: 'clearthis',lock: $('#select_lock option:selected').val()}, async: false, @@ -54,7 +54,7 @@ $(document).ready(function(){ if(data=="clear") $('#select_lock option:selected').remove(); if($.trim($('#select_lock').html())=="") - $('#lockfield').html(t("files_w2g","There are no locked files at the moment")); + $('#lockfield').html(t("workin2gether","There are no locked files at the moment")); }, }); @@ -68,7 +68,7 @@ $(document).ready(function(){ extended_checked = $('#w2g_lock_permission_extended').attr('checked')? 1 : 0; $.ajax({ - url: OC.filePath('files_w2g','ajax','update.php'), + url: OC.filePath('workin2gether','ajax','update.php'), type: "post", data: { mode: 'extended',value: extended_checked }, async: false, diff --git a/files_w2g/js/arrow.gif b/workin2gether/js/arrow.gif similarity index 100% rename from files_w2g/js/arrow.gif rename to workin2gether/js/arrow.gif diff --git a/files_w2g/js/cross.gif b/workin2gether/js/cross.gif similarity index 100% rename from files_w2g/js/cross.gif rename to workin2gether/js/cross.gif diff --git a/files_w2g/js/hs.png b/workin2gether/js/hs.png similarity index 100% rename from files_w2g/js/hs.png rename to workin2gether/js/hs.png diff --git a/files_w2g/js/hv.png b/workin2gether/js/hv.png similarity index 100% rename from files_w2g/js/hv.png rename to workin2gether/js/hv.png diff --git a/files_w2g/js/jscolor.js b/workin2gether/js/jscolor.js similarity index 100% rename from files_w2g/js/jscolor.js rename to workin2gether/js/jscolor.js diff --git a/files_w2g/js/workin2gether.js b/workin2gether/js/workin2gether.js similarity index 87% rename from files_w2g/js/workin2gether.js rename to workin2gether/js/workin2gether.js index a35347f..e42b063 100644 --- a/files_w2g/js/workin2gether.js +++ b/workin2gether/js/workin2gether.js @@ -5,20 +5,20 @@ $(document).ready(function(){ //The default text, if no translation is available text = "filelock"; - //t('files_w2g','filelock'); - lockedtext = t('files_w2g','File is locked'); - lockstate = t('files_w2g','Status: locked'); + //t('workin2gether','filelock'); + lockedtext = t('workin2gether','File is locked'); + lockstate = t('workin2gether','Status: locked'); if (typeof FileActions !== 'undefined' && $('#dir').length>0) { //Initiate the FileAction for file OCA.Files.fileActions.registerAction({ name:'getstate_w2g', - displayName: t('files_w2g',text), + displayName: t('workin2gether',text), mime: 'all', permissions: OC.PERMISSION_ALL, type: OCA.Files.FileActions.TYPE_INLINE, - icon: function(){ return OC.imagePath('files_w2g','lock.png')}, + icon: function(){ return OC.imagePath('workin2gether','lock.png')}, actionHandler: function(filename,context) { getState(context.$file.attr('data-id'),filename,context.$file.attr('data-share-owner'),"false"); @@ -41,7 +41,7 @@ $(document).ready(function(){ //Get the Background-color from the database $.ajax({ - url: OC.filePath('files_w2g','ajax','getcolor.php'), + url: OC.filePath('workin2gether','ajax','getcolor.php'), type: "post", data: { type: 'color'}, async: false, @@ -50,7 +50,7 @@ $(document).ready(function(){ //Get the Fontcolor from the database $.ajax({ - url: OC.filePath('files_w2g','ajax','getcolor.php'), + url: OC.filePath('workin2gether','ajax','getcolor.php'), type: "post", data: { type: 'fontcolor'}, async: false, @@ -108,7 +108,7 @@ function getState(_id, _filename, _owner, _safe) oc_path = oc_dir +'/'+_filename; $.ajax({ - url: OC.filePath('files_w2g','ajax','workin2gether.php'), + url: OC.filePath('workin2gether','ajax','workin2gether.php'), type: "post", data: { path: escapeHTML(oc_path), safe: _safe, owner: _owner, id: _id}, success: function(data){postmode(_filename,data)}, @@ -120,7 +120,7 @@ function postmode(filename,data) { filename = filename.replace(/%20/g,' '); - var html = ' '+''+escapeHTML(data)+''; + var html = ' '+''+escapeHTML(data)+''; //Push the status $('tr').filterAttr('data-file',filename).find('td.filename').find('a.name').find('span.fileactions').find("a.action").filterAttr('data-action','getstate_w2g').html(html); @@ -128,6 +128,6 @@ function postmode(filename,data) //Push the status text to the locked mime $('tr').filterAttr('data-file',filename).find('td.filename').find('a.namelock').find('span.fileactions').find("a.action").filterAttr('data-action','getstate_w2g').html(html); - if(data!=t('files_w2g','No permission')) + if(data!=t('workin2gether','No permission')) toggle_control(filename); } diff --git a/files_w2g/l10n/de.js b/workin2gether/l10n/de.js similarity index 98% rename from files_w2g/l10n/de.js rename to workin2gether/l10n/de.js index cfe2dd7..a820e06 100644 --- a/files_w2g/l10n/de.js +++ b/workin2gether/l10n/de.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "Datei nicht gesperrt", "File is locked" : "Datei ist gesperrt", diff --git a/files_w2g/l10n/de.json b/workin2gether/l10n/de.json similarity index 100% rename from files_w2g/l10n/de.json rename to workin2gether/l10n/de.json diff --git a/files_w2g/l10n/de.php b/workin2gether/l10n/de.php similarity index 100% rename from files_w2g/l10n/de.php rename to workin2gether/l10n/de.php diff --git a/files_w2g/l10n/de_DE.js b/workin2gether/l10n/de_DE.js similarity index 98% rename from files_w2g/l10n/de_DE.js rename to workin2gether/l10n/de_DE.js index cfe2dd7..a820e06 100644 --- a/files_w2g/l10n/de_DE.js +++ b/workin2gether/l10n/de_DE.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "Datei nicht gesperrt", "File is locked" : "Datei ist gesperrt", diff --git a/files_w2g/l10n/de_DE.json b/workin2gether/l10n/de_DE.json similarity index 100% rename from files_w2g/l10n/de_DE.json rename to workin2gether/l10n/de_DE.json diff --git a/files_w2g/l10n/de_DE.php b/workin2gether/l10n/de_DE.php similarity index 100% rename from files_w2g/l10n/de_DE.php rename to workin2gether/l10n/de_DE.php diff --git a/files_w2g/l10n/en@pirate.js b/workin2gether/l10n/en@pirate.js similarity index 92% rename from files_w2g/l10n/en@pirate.js rename to workin2gether/l10n/en@pirate.js index 1c3255b..3b6f90b 100644 --- a/files_w2g/l10n/en@pirate.js +++ b/workin2gether/l10n/en@pirate.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "File not locked", "File is locked" : "File is locked", diff --git a/files_w2g/l10n/en@pirate.json b/workin2gether/l10n/en@pirate.json similarity index 100% rename from files_w2g/l10n/en@pirate.json rename to workin2gether/l10n/en@pirate.json diff --git a/files_w2g/l10n/en@pirate.php b/workin2gether/l10n/en@pirate.php similarity index 100% rename from files_w2g/l10n/en@pirate.php rename to workin2gether/l10n/en@pirate.php diff --git a/files_w2g/l10n/en_GB.js b/workin2gether/l10n/en_GB.js similarity index 92% rename from files_w2g/l10n/en_GB.js rename to workin2gether/l10n/en_GB.js index 1c3255b..3b6f90b 100644 --- a/files_w2g/l10n/en_GB.js +++ b/workin2gether/l10n/en_GB.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "File not locked", "File is locked" : "File is locked", diff --git a/files_w2g/l10n/en_GB.json b/workin2gether/l10n/en_GB.json similarity index 100% rename from files_w2g/l10n/en_GB.json rename to workin2gether/l10n/en_GB.json diff --git a/files_w2g/l10n/en_GB.php b/workin2gether/l10n/en_GB.php similarity index 100% rename from files_w2g/l10n/en_GB.php rename to workin2gether/l10n/en_GB.php diff --git a/files_w2g/l10n/fr.js b/workin2gether/l10n/fr.js similarity index 98% rename from files_w2g/l10n/fr.js rename to workin2gether/l10n/fr.js index 3a94645..4a8b46e 100644 --- a/files_w2g/l10n/fr.js +++ b/workin2gether/l10n/fr.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "Fichier non verrouillé ", "File is locked" : " Fichier verrouillé ", diff --git a/files_w2g/l10n/fr.json b/workin2gether/l10n/fr.json similarity index 100% rename from files_w2g/l10n/fr.json rename to workin2gether/l10n/fr.json diff --git a/files_w2g/l10n/fr.php b/workin2gether/l10n/fr.php similarity index 100% rename from files_w2g/l10n/fr.php rename to workin2gether/l10n/fr.php diff --git a/files_w2g/l10n/fr_FR.js b/workin2gether/l10n/fr_FR.js similarity index 97% rename from files_w2g/l10n/fr_FR.js rename to workin2gether/l10n/fr_FR.js index 52118de..47c8a20 100644 --- a/files_w2g/l10n/fr_FR.js +++ b/workin2gether/l10n/fr_FR.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "Fichier non verrouillé ", "File is locked" : " Fichier verrouillé ", diff --git a/files_w2g/l10n/fr_FR.json b/workin2gether/l10n/fr_FR.json similarity index 100% rename from files_w2g/l10n/fr_FR.json rename to workin2gether/l10n/fr_FR.json diff --git a/files_w2g/l10n/fr_FR.php b/workin2gether/l10n/fr_FR.php similarity index 100% rename from files_w2g/l10n/fr_FR.php rename to workin2gether/l10n/fr_FR.php diff --git a/files_w2g/l10n/ja.js b/workin2gether/l10n/ja.js similarity index 98% rename from files_w2g/l10n/ja.js rename to workin2gether/l10n/ja.js index a073cb5..a1b9cce 100644 --- a/files_w2g/l10n/ja.js +++ b/workin2gether/l10n/ja.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "ファイルロック無し", "File is locked" : "ファイルロック中", diff --git a/files_w2g/l10n/ja.json b/workin2gether/l10n/ja.json similarity index 100% rename from files_w2g/l10n/ja.json rename to workin2gether/l10n/ja.json diff --git a/files_w2g/l10n/ja.php b/workin2gether/l10n/ja.php similarity index 100% rename from files_w2g/l10n/ja.php rename to workin2gether/l10n/ja.php diff --git a/files_w2g/l10n/ja_JP.js b/workin2gether/l10n/ja_JP.js similarity index 98% rename from files_w2g/l10n/ja_JP.js rename to workin2gether/l10n/ja_JP.js index a073cb5..a1b9cce 100644 --- a/files_w2g/l10n/ja_JP.js +++ b/workin2gether/l10n/ja_JP.js @@ -1,5 +1,5 @@ OC.L10N.register( - "files_w2g", + "workin2gether", { "File not locked" : "ファイルロック無し", "File is locked" : "ファイルロック中", diff --git a/files_w2g/l10n/ja_JP.json b/workin2gether/l10n/ja_JP.json similarity index 100% rename from files_w2g/l10n/ja_JP.json rename to workin2gether/l10n/ja_JP.json diff --git a/files_w2g/l10n/ja_JP.php b/workin2gether/l10n/ja_JP.php similarity index 100% rename from files_w2g/l10n/ja_JP.php rename to workin2gether/l10n/ja_JP.php diff --git a/files_w2g/templates/admin.php b/workin2gether/templates/admin.php similarity index 96% rename from files_w2g/templates/admin.php rename to workin2gether/templates/admin.php index 782b882..c5eb190 100644 --- a/files_w2g/templates/admin.php +++ b/workin2gether/templates/admin.php @@ -1,6 +1,6 @@ execute(array($configtype))->fetchAll(); + $type = \OCP\DB::prepare("SELECT * FROM *PREFIX*appconfig where configkey=? and appid='workin2gether' LIMIT 1")->execute(array($configtype))->fetchAll(); if (count($type) >= 1) $configkey = $type[0]['configvalue'];