aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/autocomplete.js40
-rw-r--r--view/js/main.js2
-rw-r--r--view/tpl/chatrooms.tpl2
-rwxr-xr-xview/tpl/jot-header.tpl1
-rwxr-xr-xview/tpl/login.tpl2
-rwxr-xr-xview/tpl/photo_album.tpl4
-rwxr-xr-xview/tpl/photos_recent.tpl10
7 files changed, 54 insertions, 7 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 437425a0e..b6e81eb8c 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -197,3 +197,43 @@ function submit_form(e) {
a.on('textComplete:select', function(e, value, strategy) { onselect(value); });
};
})( jQuery );
+
+(function( $ ) {
+ $.fn.bbco_autocomplete = function(type) {
+
+ if(type=='bbcode') {
+ var open_close_elements = ['b', 'i', 'u', 's', 'quote', 'code', 'spoiler', 'map', 'observer'];
+ var open_elements = ['observer.photo', 'observer.name', 'observer.url'];
+
+ var elements = open_close_elements.concat(open_elements);
+ }
+
+ if(type=='comanche') {
+ var elements = ['region', 'widget', 'var', 'template', 'css', 'js'];
+ }
+
+ bbco = {
+ match: /\[(\w*)$/,
+ search: function (term, callback) {
+ callback($.map(elements, function (element) {
+ return element.indexOf(term) === 0 ? element : null;
+ }));
+ },
+ index: 1,
+ replace: function (element) {
+ if(open_elements.indexOf(element) < 0) {
+ return ['\[' + element + '\]', '\[/' + element + '\]'];
+ }
+ else {
+ return '\[' + element + '\] ';
+ }
+ }
+ };
+
+ this.attr('autocomplete','off');
+ var a = this.textcomplete([bbco], {className:'acpopup', zIndex:1020});
+
+ a.on('textComplete:select', function(e, value, strategy) { value; });
+ };
+})( jQuery );
+
diff --git a/view/js/main.js b/view/js/main.js
index 04b317914..ba476b576 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -617,6 +617,8 @@ function updateConvItems(mode,data) {
/* autocomplete @nicknames */
$(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");
+ /* autocomplete bbcode */
+ $(".comment-edit-form textarea").bbco_autocomplete('bbcode');
var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; }));
var bimgcount = bimgs.length;
diff --git a/view/tpl/chatrooms.tpl b/view/tpl/chatrooms.tpl
index de8cdce7c..d35148f7c 100644
--- a/view/tpl/chatrooms.tpl
+++ b/view/tpl/chatrooms.tpl
@@ -21,7 +21,7 @@
<tr class="chatroom-index-row">
<td><a href="{{$baseurl}}/chat/{{$nickname}}/{{$room.cr_id}}">{{$room.cr_name}}</a></td>
<td>{{$room.cr_expire}}&nbsp;min</td>
- <td class="chatrooms-index-tool dropdown pull-right">
+ <td class="chatrooms-index-tool{{if $room.allow_cid || $room.allow_gid || $room.deny_cid || $room.deny_gid}} dropdown pull-right{{/if}}">
{{if $room.allow_cid || $room.allow_gid || $room.deny_cid || $room.deny_gid}}
<i class="icon-lock lockview dropdown-toggle" data-toggle="dropdown" onclick="lockview('chatroom',{{$room.cr_id}});"></i>
<ul id="panel-{{$room.cr_id}}" class="lockview-panel dropdown-menu"></ul>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 84fccc105..2b62f2407 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -11,6 +11,7 @@ function initEditor(cb){
if(plaintext == 'none') {
$("#profile-jot-text-loading").spin(false).hide();
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
+ $("#profile-jot-text").bbco_autocomplete('bbcode'); // autocomplete bbcode
if(typeof channelId === 'undefined')
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
else
diff --git a/view/tpl/login.tpl b/view/tpl/login.tpl
index da38f3571..d56c8f272 100755
--- a/view/tpl/login.tpl
+++ b/view/tpl/login.tpl
@@ -5,7 +5,7 @@
<div id="login-input" class="form-group">
{{include file="field_input.tpl" field=$lname}}
{{include file="field_password.tpl" field=$lpassword}}
- {{include file="field_checkbox.tpl" field=$remember}}
+ {{include file="field_checkbox.tpl" field=$remember_me}}
<button type="submit" name="submit" class="btn btn-block btn-primary">{{$login}}</button>
</div>
<div id="login-extra-links">
diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl
index 95169164a..3007c0bcc 100755
--- a/view/tpl/photo_album.tpl
+++ b/view/tpl/photo_album.tpl
@@ -1,6 +1,8 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<div class="pull-right">
+ <button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="icon-resize-full"></i></button>
+ <button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="icon-resize-small"></i></button>
{{if $order}}
<a class="btn btn-default btn-xs" href="{{$order.1}}" title="{{$order.0}}"><i class="icon-sort"></i></a>
{{/if}}
@@ -13,9 +15,7 @@
{{/if}}
</div>
</div>
-
<h2>{{$album}}</h2>
-
<div class="clear"></div>
</div>
{{$upload_form}}
diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl
index f3131117c..3e296658f 100755
--- a/view/tpl/photos_recent.tpl
+++ b/view/tpl/photos_recent.tpl
@@ -1,8 +1,12 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
- {{if $can_post}}
- <button class="btn btn-xs btn-success pull-right" title="{{$usage}}" onclick="openClose('photo-upload-form');"><i class="icon-upload"></i>&nbsp;{{$upload.0}}</button>
- {{/if}}
+ <div class="pull-right">
+ <button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="icon-resize-full"></i></button>
+ <button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="icon-resize-small"></i></button>
+ {{if $can_post}}
+ <button class="btn btn-xs btn-success" title="{{$usage}}" onclick="openClose('photo-upload-form');"><i class="icon-upload"></i>&nbsp;{{$upload.0}}</button>
+ {{/if}}
+ </div>
<h2>{{$title}}</h2>
<div class="clear"></div>
</div>