mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-18 14:52:10 +01:00
Bookmark: Display bmlet if there is not bookmarks yet fix #136
This commit is contained in:
parent
85ba9207d8
commit
e78fc2baa0
@ -1,9 +1,9 @@
|
||||
#content { overflow: auto; height: 100%; }
|
||||
#firstrun { width: 80%; margin: 5em auto auto auto; text-align: center; font-weight:bold; font-size:1.5em; color:#777; position: relative;}
|
||||
#firstrun small { display: block; font-weight: normal; font-size: 0.5em; margin-bottom: 1.5em; }
|
||||
#firstrun, #firstrun_setting{ width: 80%; margin: 5em auto auto auto; text-align: center; font-weight:bold; font-size:1.5em; color:#777; position: relative;}
|
||||
#firstrun small { display: block; font-weight: normal; font-size: 0.5em; }
|
||||
#firstrun .button { font-size: 0.7em; }
|
||||
#firstrun #selections { font-size:0.8em; font-weight: normal; width: 100%; margin: 2em auto auto auto; clear: both; }
|
||||
|
||||
#firstrun_setting { font-size: 100%; text-decoration: underline}
|
||||
|
||||
input.disabled, input.disabled:hover {
|
||||
cursor: not-allowed;
|
||||
|
@ -9,8 +9,11 @@ $(document).ready(function() {
|
||||
$('#add_url').on('keydown keyup change click', watchUrlField);
|
||||
$('#settingsbtn').on('click keydown', toggleSettings);
|
||||
$('#bm_export').click(exportBm);
|
||||
|
||||
$(window).resize();
|
||||
$('#firstrun_setting').click(function(){
|
||||
if(! $('#bookmark_settings').hasClass('open')){
|
||||
$('#settingsbtn').click();
|
||||
}
|
||||
});
|
||||
$('.bookmarks_list').scroll(updateOnBottom).empty();
|
||||
$('#tag_filter input').tagit({
|
||||
allowSpaces: true,
|
||||
|
@ -6,6 +6,14 @@
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
function bookmarklet(){
|
||||
$l = new OC_l10n('bookmarks');
|
||||
$blet = "javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=document.title,d=a.open('";
|
||||
$blet .= OCP\Util::linkToAbsolute('bookmarks', 'addBm.php');
|
||||
$blet .= "?output=popup&url='+c(b.location)+'&title='+e,'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=400px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300);})();";
|
||||
$help_msg = $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:');
|
||||
return '<small>'.$help_msg.'</small><br /><a class="button bookmarklet" href="' . $blet . '">' . $l->t('Read later') . '</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="leftcontent">
|
||||
@ -39,15 +47,15 @@
|
||||
|
||||
</div>
|
||||
<div id="rightcontent" class="rightcontent">
|
||||
<div class="bookmarks_list"></div>
|
||||
<div id="firstrun" style="display: none;">
|
||||
<?php
|
||||
echo $l->t('You have no bookmarks');
|
||||
$embedded = true;/*
|
||||
require_once OC_App::getAppPath('bookmarks') .'/templates/bookmarklet.php' ;
|
||||
createBookmarklet(); */
|
||||
?>
|
||||
<div id="appsettings" class="popup bottomleft hidden"></div>
|
||||
$embedded = true;
|
||||
|
||||
echo bookmarklet();?><br/><br />
|
||||
|
||||
<small><a href="#" id="firstrun_setting"><?php echo $l->t('You can also try to import a bookmark file');?></a></small>
|
||||
<div class="bookmarks_list"></div>
|
||||
</div>
|
||||
<script>
|
||||
var fullTags = <?php echo $_['tags'];?>;
|
||||
|
@ -9,15 +9,7 @@
|
||||
|
||||
<fieldset class="personalblock">
|
||||
<legend><strong><?php echo $l->t('Bookmarklet');?></strong></legend>
|
||||
<small>
|
||||
<?php echo $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:');?>
|
||||
</small><br />
|
||||
<a class="button bookmarklet"
|
||||
href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=document.title,d=a.open('<?php
|
||||
echo OCP\Util::linkToAbsolute('bookmarks', 'addBm.php');
|
||||
?>'?output=popup&url=\'+c(b.location)+\'&title=\'+e,\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=400px,width=550px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">
|
||||
<?php echo $l->t('Read later');?>
|
||||
</a>
|
||||
<?php echo bookmarklet();?><br />
|
||||
</fieldset>
|
||||
|
||||
<form id="import_bookmark" action="<?php echo OCP\Util::linkTo( "bookmarks", "ajax/import.php" );?>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user