diff options
author | friendica <info@friendica.com> | 2014-12-21 14:45:46 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-12-21 14:45:46 -0800 |
commit | b840c279957667168b400207caff14dc78043994 (patch) | |
tree | ece0b11af5e7055226c566e4aa35ef4a7a781de0 /view | |
parent | 2b3cc585a24cbdf97e8e2382752297bc4f725e12 (diff) | |
parent | c732b72a0dde2c8b4d49e63114c9415f44a8a8d7 (diff) | |
download | volse-hubzilla-b840c279957667168b400207caff14dc78043994.tar.gz volse-hubzilla-b840c279957667168b400207caff14dc78043994.tar.bz2 volse-hubzilla-b840c279957667168b400207caff14dc78043994.zip |
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'view')
-rw-r--r-- | view/css/conversation.css | 4 | ||||
-rw-r--r-- | view/css/mod_cloud.css | 5 | ||||
-rw-r--r-- | view/js/autocomplete.js | 4 | ||||
-rw-r--r-- | view/js/main.js | 12 | ||||
-rw-r--r-- | view/js/mod_filestorage.js | 1 | ||||
-rw-r--r-- | view/php/theme_init.php | 2 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 68 | ||||
-rw-r--r-- | view/tpl/attach_edit.tpl | 14 | ||||
-rw-r--r-- | view/tpl/cloud_actionspanel.tpl | 42 | ||||
-rw-r--r-- | view/tpl/cloud_directory.tpl | 14 | ||||
-rw-r--r-- | view/tpl/cloud_header.tpl | 13 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 12 |
12 files changed, 101 insertions, 90 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css index 1e9930443..7a5ffc2f7 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -8,9 +8,7 @@ code { /* jot */ -#jot-title, -#jot-category, -#jot-pagetitle { +.jothidden input { border: 0px; margin: 0px; padding: 8px; diff --git a/view/css/mod_cloud.css b/view/css/mod_cloud.css new file mode 100644 index 000000000..cc5fe890f --- /dev/null +++ b/view/css/mod_cloud.css @@ -0,0 +1,5 @@ +#files-mkdir-tools, +#files-upload-tools { + display: none; +} + diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index fa293fdfd..e62959a6c 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -50,9 +50,9 @@ function replace(item) { smilies = { match: /(^|\s)(:[a-z]{2,})$/, index: 2, - search: function(term, callback) { $.getJSON('https://caterva.eu/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry['text'].indexOf(term) === 0 ? entry : null })) }) }, + search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry['text'].indexOf(term) === 0 ? entry : null })) }) }, template: function(item) { return item['icon'] + item['text'] }, - replace: function(item) { return item['text'] + ' '; }, + replace: function(item) { return "$1"+item['text'] + ' '; }, } this.textcomplete([contacts,smilies],{}); }; diff --git a/view/js/main.js b/view/js/main.js index a851e7e63..f49cea78c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -208,6 +208,7 @@ var pageHasMoreContent = true; var updateCountsOnly = false; var divmore_height = 400; + var last_filestorage_id = null; $(function() { $.ajaxSetup({cache: false}); @@ -842,6 +843,17 @@ function updateConvItems(mode,data) { }); } + function filestorage(event,nick,id) { + $('#perms-panel-' + last_filestorage_id).html(''); + $('#file-edit-' + id).spin('tiny'); + delete acl; + $.get('filestorage/' + nick + '/' + id + '/edit', function(data) { + $('#perms-panel-' + id).html(data); + $('#file-edit-' + id).spin(false); + last_filestorage_id = id; + }); + } + function post_comment(id) { unpause(); commentBusy = true; diff --git a/view/js/mod_filestorage.js b/view/js/mod_filestorage.js index 88c1cf7d8..bee37767f 100644 --- a/view/js/mod_filestorage.js +++ b/view/js/mod_filestorage.js @@ -13,4 +13,5 @@ $(document).ready(function() { } }).trigger('change'); + }); diff --git a/view/php/theme_init.php b/view/php/theme_init.php index ff8b54c55..f28f9aa8d 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -11,6 +11,7 @@ head_add_css('library/colorbox/colorbox.css'); head_add_css('view/css/conversation.css'); head_add_css('view/css/widgets.css'); head_add_css('library/justifiedGallery/dist/css/justifiedGallery.css'); +head_add_css('library/bootstrap-tagsinput/bootstrap-tagsinput.css'); head_add_js('jquery.js'); head_add_js('jquery-migrate-1.1.1.js'); @@ -41,6 +42,7 @@ head_add_js('crypto.js'); head_add_js('library/jslider/bin/jquery.slider.min.js'); head_add_js('docready.js'); head_add_js('library/colorbox/jquery.colorbox-min.js'); +head_add_js('library/bootstrap-tagsinput/bootstrap-tagsinput.js'); /** * Those who require this feature will know what to do with it. diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 382bed90e..4681ef5ba 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1746,44 +1746,23 @@ img.mail-list-sender-photo { max-width: $converse_width; } -#jot-title, -#jot-category, -#jot-pagetitle { +.jothidden { font-weight: bold; - border: solid 1px #ffffff; border-radius: $radiuspx; } -#jot-category::-webkit-input-placeholder { +.jothidden input::-webkit-input-placeholder { font-weight: bold; } -#jot-category:-moz-placeholder { +.jothidden input::-moz-placeholder { font-weight: bold; } -#jot-title::-webkit-input-placeholder { - font-weight: bold; -} - -#jot-title:-moz-placeholder { - font-weight: bold; +.jothidden >input, .jothidden >input { + border: 1px solid #fff; } - -#jot-pagetitle::-webkit-input-placeholder { - font-weight: bold; -} - -#jot-pagetitle:-moz-placeholder { - font-weight: bold; -} - -#jot-title:hover, -#jot-title:focus, -#jot-pagetitle:hover, -#jot-pagetitle:focus, -#jot-category:hover, -#jot-category:focus { +.jothidden >input:hover, .jothidden >input:focus { border: 1px solid #cccccc; } @@ -2076,18 +2055,8 @@ nav .dropdown-menu>li>a:hover,nav .dropdown-menu>li>a:focus{ color: $nav_active_icon_colour; } -/* Files */ - -#attach-edit-perms { - margin-top: 25px; - margin-bottom: 20px; - font-weight: bold; - font-size: 17px; -} - /* bootstrap overrides */ - blockquote { font-size: $font_size; font-style: italic; @@ -2368,3 +2337,28 @@ aside .nav > li > a:hover, aside .nav > li > a:focus { .bb_observer img { border: 3px solid red !important; } + +.bootstrap-tagsinput .tag:before { + /* Copied from icon-asterisk, is there a better way to do it? */ + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + content:"\f069"; +} + +/* Modified original CSS to match input in Redbasic */ +.bootstrap-tagsinput { + border-color:#fff; + background-color: #fff; + box-shadow: none; + display: inline-block; + border-radius: $radiuspx; + cursor: text; + padding: 0 6px; + width: 70% !important; +} + +.jothidden .bootstrap-tagsinput:hover, .jothidden .bootstrap-tagsinput:focus { + border: 1px solid #cccccc; +} diff --git a/view/tpl/attach_edit.tpl b/view/tpl/attach_edit.tpl index a2a4af16b..bf39e6158 100644 --- a/view/tpl/attach_edit.tpl +++ b/view/tpl/attach_edit.tpl @@ -1,16 +1,16 @@ -<div id="attach-edit-backlink">< <a href="{{$parentpath}}">{{$backlink}}</a></div> - -<h1>{{$header}}</h1> - <form action="filestorage/{{$channelnick}}/{{$file.id}}/edit" method="post" > <div id="attach-edit-perms" > <button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;"> <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i> </button> -{{$aclselect}} {{$file.filename}} +<button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" name="submit"> + {{$submit}} +</button> </div> +{{$aclselect}} + <input type="hidden" name="channelnick" value="{{$channelnick}}" /> <input type="hidden" name="filehash" value="{{$file.hash}}" /> <input type="hidden" name="uid" value="{{$uid}}" /> @@ -28,9 +28,7 @@ <div class="cut-paste-desc">{{$cpldesc}}</div> <input type="text" id="linkpasteinput" name="cutpasteextlink" value="{{$cloudpath}}" onclick="this.select();"/><br /> - <div class="clear"></div> -<input id="dbtn-submit" type="submit" name="submit" value="{{$submit}}" /> -</form> +</form> diff --git a/view/tpl/cloud_actionspanel.tpl b/view/tpl/cloud_actionspanel.tpl index 00f243c1e..d88bc94c4 100644 --- a/view/tpl/cloud_actionspanel.tpl +++ b/view/tpl/cloud_actionspanel.tpl @@ -1,27 +1,17 @@ -<div class="generic-content-wrapper-styled"> - -<table> - <tr> - <td><strong>{{$folder_header}}</strong> </td> - <td> - <form method="post" action=""> - <input type="hidden" name="sabreAction" value="mkcol"> - <input type="text" name="name"> - <input type="submit" value="{{$folder_submit}}"> - </form> - </td> - </tr> - <tr> - <td><strong>{{$upload_header}}</strong> </td> - <td> - <form method="post" action="" enctype="multipart/form-data"> - <input type="hidden" name="sabreAction" value="put"> - <input type="file" name="file" style="display: inline;"> - <input type="submit" value="{{$upload_submit}}"> - <!-- Name (optional): <input type="text" name="name"> we should rather provide a rename action in edit form--> - </form> - </td> - </tr> -</table> - +<div id="files-mkdir-tools" class="section-content-tools-wrapper form-group"> + <label for="files-mkdir">{{$folder_header}}</label> + <form method="post" action=""> + <input type="hidden" name="sabreAction" value="mkcol"> + <input id="files-mkdir" type="text" name="name"> + <input type="submit" value="{{$folder_submit}}"> + </form> +</div> +<div id="files-upload-tools" class="section-content-tools-wrapper form-group"> + <label for="files-upload">{{$upload_header}}</label> + <form method="post" action="" enctype="multipart/form-data"> + <input type="hidden" name="sabreAction" value="put"> + <input id="files-upload" type="file" name="file" style="display: inline;"> + <input type="submit" value="{{$upload_submit}}"> + <!-- Name (optional): <input type="text" name="name"> we should rather provide a rename action in edit form--> + </form> </div> diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl index 639a6bf61..f37895e09 100644 --- a/view/tpl/cloud_directory.tpl +++ b/view/tpl/cloud_directory.tpl @@ -1,5 +1,5 @@ <div class="generic-content-wrapper-styled"> -<h1>{{$header}}</h1> + <table id="cloud-index"> <tr> <th></th> @@ -26,8 +26,9 @@ <td style="min-width: 15em"><a href="{{$item.fullPath}}">{{$item.displayName}}</a></td> {{if $item.is_owner}} <td>{{$item.attachIcon}}</td> - <td style="position:relative;"><a href="{{$item.fileStorageUrl}}/{{$item.attachId}}/edit" title="{{$edit}}"><i class="icon-pencil btn btn-default"></i></a></td> - <td><a href="{{$item.fileStorageUrl}}/{{$item.attachId}}/delete" title="{{$delete}}" onclick="return confirmDelete();"><i class="icon-remove btn btn-default drop-icons"></i></a></td> + <td style="position:relative;"><i id="file-edit-{{$item.attachId}}" class="fakelink icon-pencil" onclick="filestorage(event, '{{$nick}}', {{$item.attachId}});"></i></td> + <td><a href="{{$item.fileStorageUrl}}/{{$item.attachId}}/delete" title="{{$delete}}" onclick="return confirmDelete();"><i class="icon-remove drop-icons"></i></a></td> + {{else}} <td></td><td></td><td></td> {{/if}} @@ -35,11 +36,8 @@ <td>{{$item.sizeFormatted}}</td> <td>{{$item.lastmodified}}</td> </tr> + <tr><td id="perms-panel-{{$item.attachId}}" colspan="8"></td></tr> {{/foreach}} - <tr><td colspan="8"><hr></td></tr> -</table> -{{if $quota.limit || $quota.used}} - <p><strong>{{$total}}</strong> {{$quota.desc}}</p> -{{/if}} +</table> </div> diff --git a/view/tpl/cloud_header.tpl b/view/tpl/cloud_header.tpl new file mode 100644 index 000000000..f5f123edb --- /dev/null +++ b/view/tpl/cloud_header.tpl @@ -0,0 +1,13 @@ +<div class="section-title-wrapper"> + {{if $actionspanel}} + <div class="pull-right"> + <button id="files-create-btn"class="btn btn-xs btn-primary" title="{{if $quota.limit || $quota.used}}{{$quota.desc}}{{/if}}" onclick="openClose('files-mkdir-tools'); closeMenu('files-upload-tools');"><i class="icon-folder-close-alt"></i> Create</button> + <button id="files-upload-btn" class="btn btn-xs btn-success" title="{{if $quota.limit || $quota.used}}{{$quota.desc}}{{/if}}" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="icon-upload"></i> Upload</button> + </div> + {{/if}} + <h2>{{$header}}</h2> + <div class="clear"></div> +</div> +{{if $actionspanel}} + {{$actionspanel}} +{{/if}} diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 34acce879..00ef77d93 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -19,17 +19,17 @@ <span class="channel-id-select-desc">{{$id_seltext}}</span> {{$id_select}} </div> {{/if}} - <div id="jot-title-wrap"> - <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}" class="jothidden" style="display:none"> + <div id="jot-title-wrap" class="jothidden" style="display:none"> + <input name="title" id="jot-title" type="text" placeholder="{{$placeholdertitle}}" value="{{$title}}"> </div> {{if $catsenabled}} - <div id="jot-category-wrap"> - <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="jothidden" style="display:none" /> + <div id="jot-category-wrap" class="jothidden" style="display:none"> + <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="tagsinput"/> </div> {{/if}} {{if $webpage}} - <div id="jot-pagetitle-wrap"> - <input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}" class="jothidden" style="display:none" /> + <div id="jot-pagetitle-wrap" class="jothidden" style="display:none"> + <input name="pagetitle" id="jot-pagetitle" type="text" placeholder="{{$placeholdpagetitle}}" value="{{$pagetitle}}" /> </div> {{/if}} <div id="jot-text-wrap"> |