diff --git a/css/bookmarks.css b/css/bookmarks.css index 3062ad9c..b6b09327 100644 --- a/css/bookmarks.css +++ b/css/bookmarks.css @@ -5,9 +5,7 @@ #firstrun #selections { font-size:0.8em; font-weight: normal; width: 100%; margin: 2em auto auto auto; clear: both; } #leftcontent { -/* margin: 0; */ padding-top: 1em; -/* top: 3.5em !important; */ } #rightcontent { @@ -22,7 +20,6 @@ border: 1px solid lightgray; border-right:0; border-radius: 0.5em 0em 0em 0.5em; -/* margin-right: 10px; */ padding: 3px; } @@ -46,8 +43,6 @@ overflow: auto; position: fixed; top: 6.5em; -/* margin-left: 15px; */ - } #add_url { @@ -156,11 +151,9 @@ } .addBm textarea{ min-width:250px; -/* min-height: 70px; */ } .addBm .close_btn { -/* background-color: #EEEEEE; */ height: 18px; margin: -20px 0 0; padding: 1px; @@ -178,10 +171,6 @@ } -.ui-autocomplete { -/* background: none repeat scroll 0 0 #DEE7F8; */ -} - #leftcontent > ul > li, .leftcontent li { padding: 0.2em; padding-left:1em; @@ -199,8 +188,6 @@ border-radius: 6px 6px 6px 6px; color: #555555; font-weight: normal; - -/* padding: 0.2em 18px 0.2em 0.5em; */ float:left; padding: 0.3em; position: relative; @@ -236,7 +223,6 @@ li:hover em { display : none; } #tag_filter ul.tagit li.tagit-choice { background: none repeat scroll 0 0 #DEE7F8; padding: 0.2em 18px 0.2em 0.5em; -/* padding:0; */ } #tag_filter a { @@ -268,8 +254,6 @@ li:hover em { display : none; } float: left; height: 240px; margin: 1em; - -/* background: none repeat scroll 0 0 #EEEEEE; */ border-radius: 8px 8px 8px 8px; box-shadow: 0 0 5px rgba(34, 25, 25, 0.5); } @@ -349,6 +333,7 @@ li:hover em { display : none; } width: 20em; z-index: 2; } + #leftcontent #bookmark_settings li{ padding: 0; background-color:transparent; @@ -358,16 +343,43 @@ li:hover em { display : none; } } #bookmark_settings .controls { - height: 100%; + height: 2.8em; width: 100%; } #bookmark_settings .controls > li:last-child button { margin-right: 0.3em; } -#bookmark_settings button { +#bookmark_settings .controls button { height: 2.4em; margin: 0.15em 0 0 0.15em; padding: 0.2em 0.1em 0; width: 2.4em; +} + +#bookmark_settings.open { + height: 300px; +} +#bm_setting_panel { + background-color: white; + padding: 1em; + height: 100%; + display:none; +} +.open #bm_setting_panel { display:block; } + +#bm_setting_panel legend{ + margin-top: 0.5em; +} + +#bm_import { + opacity: 0; + position: absolute; +} +#import_bookmark .personalblock { + margin-top: 1em; +} +#leftcontent a.bookmarklet { + margin-top: 5px; + padding: 0 5px 2px; } \ No newline at end of file diff --git a/index.php b/index.php index 5da06b7d..66892f82 100644 --- a/index.php +++ b/index.php @@ -29,6 +29,7 @@ OCP\App::checkAppEnabled('bookmarks'); OCP\App::setActiveNavigationEntry( 'bookmarks_index' ); +OCP\Util::addscript('bookmarks', 'settings'); OCP\Util::addscript('bookmarks', 'bookmarks'); OCP\Util::addStyle('bookmarks', 'bookmarks'); OCP\Util::addscript('bookmarks', 'addBm'); diff --git a/js/bookmarks.js b/js/bookmarks.js index 0b5f4f08..c151bb95 100644 --- a/js/bookmarks.js +++ b/js/bookmarks.js @@ -9,13 +9,13 @@ $(document).ready(function() { $('.centercontent').click(clickSideBar); $('#view_type input').click(clickSwitchView); $('#bookmark_add_submit').click(addBookmark); + +// $('#bm_import_submit').click(attachSettingEvent); + $('#bm_import').change(attachSettingEvent); $('#settingsbtn').on('click keydown', function() { - try { - OC.appSettings({appid:'bookmarks', loadJS:true, cache:false}); - } catch(e) { - alert(e); - } + $('#bookmark_settings').toggleClass('open'); }); + $('#bm_export').click(exportBm); $(window).resize(function () { fillWindow($('.bookmarks_list')); diff --git a/js/settings.js b/js/settings.js index f005337d..1865983e 100644 --- a/js/settings.js +++ b/js/settings.js @@ -1,12 +1,12 @@ -$(document).ready(function() { - $('#bm_import_submit').click(attachSettingEvent); -}); - - function attachSettingEvent(event) { event.preventDefault(); fileUpload($(this).closest('form'), $('#upload')); } + +function exportBm(e) { + window.location = $(this).attr('href'); +} + function fileUpload(form, result_div) { var uploadEventHandler = function () { diff --git a/settings.php b/settings.php deleted file mode 100644 index dae1d581..00000000 --- a/settings.php +++ /dev/null @@ -1,12 +0,0 @@ - - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -OCP\App::checkAppEnabled('bookmarks'); - -$tmpl = new OCP\Template('bookmarks', 'settings'); -$tmpl->printPage(); diff --git a/templates/bookmarklet.php b/templates/bookmarklet.php deleted file mode 100644 index b645388c..00000000 --- a/templates/bookmarklet.php +++ /dev/null @@ -1,8 +0,0 @@ -' . $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:') . '
' - . '' - . $l->t('Read later') . ''; -} diff --git a/templates/list.php b/templates/list.php index 57cad422..b529d49c 100644 --- a/templates/list.php +++ b/templates/list.php @@ -33,14 +33,17 @@
- + +
+
+
@@ -48,9 +51,9 @@ diff --git a/templates/settings.php b/templates/settings.php index 33a96c1d..1af87301 100644 --- a/templates/settings.php +++ b/templates/settings.php @@ -8,11 +8,16 @@ ?>
- t('Bookmarklet
');?>
- + t('Bookmarklet');?> + + t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:');?> +
+ + t('Read later');?> +
" @@ -23,16 +28,13 @@

- t('Import bookmarks');?> -

- -

- -
+ t('Export & Import');?> + + + +
+ - t('Export bookmarks');?> -

t('Export'); ?>