From 3debb6745815bb854c477d63090b7df03620ab20 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 22 Aug 2012 11:52:50 -0400 Subject: Move share CSS to core, add script and style from inside Share API --- apps/files_sharing/css/sharing.css | 17 ----------------- core/css/share.css | 17 +++++++++++++++++ lib/public/share.php | 2 ++ 3 files changed, 19 insertions(+), 17 deletions(-) delete mode 100644 apps/files_sharing/css/sharing.css create mode 100644 core/css/share.css diff --git a/apps/files_sharing/css/sharing.css b/apps/files_sharing/css/sharing.css deleted file mode 100644 index a683a24a116..00000000000 --- a/apps/files_sharing/css/sharing.css +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net - This file is licensed under the Affero General Public License version 3 or later. - See the COPYING-README file. */ - -#dropdown { display:block; position:absolute; z-index:500; width:16em; right:0; margin-right:7em; background:#eee; padding:1em; --moz-box-shadow:0 1px 1px #777; -webkit-box-shadow:0 1px 1px #777; box-shadow:0 1px 1px #777; --moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; --moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; } -#shareWithList { padding:0.5em; list-style-type: none; } -#shareWithList li { padding-top:0.1em; } -#dropdown label { font-weight:normal; } -#dropdown input[type="checkbox"] { margin:0 0.2em 0 0.5em; } -a.showCruds { display:inline; opacity:.5; } -a.showCruds:hover { opacity:1; } -a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opacity:.5; } -a.unshare:hover { opacity:1; } -#privateLink { border-top:1px solid #ddd; padding-top:0.5em; } \ No newline at end of file diff --git a/core/css/share.css b/core/css/share.css new file mode 100644 index 00000000000..a683a24a116 --- /dev/null +++ b/core/css/share.css @@ -0,0 +1,17 @@ +/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net + This file is licensed under the Affero General Public License version 3 or later. + See the COPYING-README file. */ + +#dropdown { display:block; position:absolute; z-index:500; width:16em; right:0; margin-right:7em; background:#eee; padding:1em; +-moz-box-shadow:0 1px 1px #777; -webkit-box-shadow:0 1px 1px #777; box-shadow:0 1px 1px #777; +-moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; +-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; } +#shareWithList { padding:0.5em; list-style-type: none; } +#shareWithList li { padding-top:0.1em; } +#dropdown label { font-weight:normal; } +#dropdown input[type="checkbox"] { margin:0 0.2em 0 0.5em; } +a.showCruds { display:inline; opacity:.5; } +a.showCruds:hover { opacity:1; } +a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opacity:.5; } +a.unshare:hover { opacity:1; } +#privateLink { border-top:1px solid #ddd; padding-top:0.5em; } \ No newline at end of file diff --git a/lib/public/share.php b/lib/public/share.php index b4ff205a70c..e24149364f7 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -69,6 +69,8 @@ class Share { public static function registerBackend($itemType, $class, $collectionOf = null, $supportedFileExtensions = null) { if (!isset(self::$backendTypes[$itemType])) { self::$backendTypes[$itemType] = array('class' => $class, 'collectionOf' => $collectionOf, 'supportedFileExtensions' => $supportedFileExtensions); + \OC_Util::addScript('core', 'share'); + \OC_Util::addStyle('core', 'share'); return true; } \OC_Log::write('OCP\Share', 'Sharing backend '.$class.' not registered, '.self::$backendTypes[$itemType]['class'].' is already registered for '.$itemType, \OC_Log::WARN); -- cgit v1.2.3