mirror of
https://github.com/owncloud/bookmarks.git
synced 2024-11-29 04:24:11 +01:00
Remove labels to use placeholders instead. Remove r-o url
This commit is contained in:
parent
95d2be3772
commit
f79469063c
@ -136,9 +136,6 @@
|
||||
|
||||
}
|
||||
|
||||
.addBm .url {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.addBm fieldset > ul > li {
|
||||
margin-top: 1em;
|
||||
|
20
js/addBm.js
20
js/addBm.js
@ -29,19 +29,9 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
base.edit_url = function (event) {
|
||||
base.$el.find('.url_input').slideToggle();
|
||||
}
|
||||
|
||||
base.change_url = function (event) {
|
||||
base.$el.find('.url-ro code').text(base.$el.find('.url_input').val());
|
||||
}
|
||||
|
||||
base.init = function(){
|
||||
base.options = $.extend({},$.bookmark_dialog.defaultOptions, options);
|
||||
base.$el.find('form').bind('submit.addBmform',base.form_submit);
|
||||
base.$el.find('.url-ro img').bind('click',base.edit_url);
|
||||
base.$el.find('.url_input').bind('keypress',base.change_url);
|
||||
// Init Tagging thing
|
||||
base.$el.find('.tags').tagit({
|
||||
allowSpaces: true,
|
||||
@ -52,23 +42,19 @@
|
||||
record = base.options['record'];
|
||||
base.$el.find('.record_id').val(record.id);
|
||||
base.$el.find('.title').val(record.title);
|
||||
base.$el.find('.url-ro code').text(record.url);
|
||||
base.$el.find('.url_input').val(record.url);
|
||||
base.$el.find('.desc').val(record.description);
|
||||
base.$el.find('.is_public').val(record.public);
|
||||
tagit_elem = base.$el.find('.tags');
|
||||
for(var i=0;i<record.tags.length;i++) {
|
||||
tagit_elem.tagit('createTag', record.tags[i]);
|
||||
console.log(record.tags[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(base.$el.find('.url-ro code').text() != '')
|
||||
base.$el.find('.url_input').hide();
|
||||
else
|
||||
base.$el.find('.url_input').show()
|
||||
base.$el.find('.tagit-new input').attr('placeholder',t('bookmark', 'Tags'));
|
||||
|
||||
};
|
||||
|
||||
|
||||
base.init();
|
||||
};
|
||||
|
||||
|
@ -175,7 +175,7 @@ function createEditDialog(record){
|
||||
dialog_html = $('#edit_dialog').html();
|
||||
var dialog = $(dialog_html).dialog({
|
||||
width : 620,
|
||||
height: 450,
|
||||
height: 400,
|
||||
title: t('bookmark', 'Edit bookmark'),
|
||||
modal: true,
|
||||
close : function(event, ui) {
|
||||
|
@ -14,22 +14,14 @@
|
||||
<fieldset class="bm_desc">
|
||||
<ul>
|
||||
<li>
|
||||
<label for="title"><strong><?php echo $l->t('Title');?></strong></label>
|
||||
<input type="text" name="title" class="title" value="<?php echo $_['bookmark']['title']; ?>" placeholder="<?php echo $l->t('The title of the page');?>" />
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="url"><strong><?php echo $l->t('Address');?></strong></label>
|
||||
<div class="url-ro">
|
||||
<code><?php echo $_['bookmark']['url']; ?></code>
|
||||
<img class="svg action" src="<?php echo image_path('core','actions/rename.svg')?>"
|
||||
alt="<?php echo $l->t('Edit');?>" title="<?php echo $l->t('Edit');?>" />
|
||||
</div>
|
||||
<input type="text" name="url" class="url_input" value="<?php echo $_['bookmark']['url']; ?>" placeholder="<?php echo $l->t('The address of the page');?>" />
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="tags"><strong><?php echo $l->t('Tags');?></strong></label>
|
||||
<ul class="tags" >
|
||||
<?php foreach($_['bookmark']['tags'] as $tag):?>
|
||||
<li><?php echo $tag;?></li>
|
||||
@ -38,7 +30,6 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="desc"><strong><?php echo $l->t('Description');?></strong></label>
|
||||
<textarea name="desc" class="desc" value="<?php echo $_['bookmark']['desc']; ?>" placeholder="<?php echo $l->t('Description of the page');?>"></textarea>
|
||||
</li>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user