fix mobile photo uploads; better theme control; frost improvements
This commit is contained in:
parent
776552226b
commit
999c3439e6
32 changed files with 605 additions and 278 deletions
92
view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js
Normal file
92
view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.js
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Simon Hibbard
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Version: V1.3.1-f1
|
||||
* Release: 22-12-2010
|
||||
* Based on jQuery 1.4.2
|
||||
*
|
||||
* 2012-10-29: Modified by Zach Prezkuta to allow dynamic full heights
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
var divgrowid = 0;
|
||||
$.fn.divgrow = function (options) {
|
||||
var options = $.extend({}, { initialHeight: 100, moreText: "+ Show More", lessText: "- Show Less", speed: 1000, showBrackets: true }, options);
|
||||
|
||||
return this.each(function () {
|
||||
divgrowid++;
|
||||
|
||||
obj = $(this);
|
||||
|
||||
//var fullHeight = obj.height() + 10;
|
||||
|
||||
obj.css('height', options.initialHeight).css('overflow', 'hidden');
|
||||
if (options.showBrackets) {
|
||||
obj.after('<p class="divgrow-brackets">[…]</p><a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>');
|
||||
}
|
||||
else {
|
||||
obj.after('<a href="#" class="divgrow-showmore' + " divgrow-obj-" + divgrowid + '"' + '></a>');
|
||||
}
|
||||
$("a.divgrow-showmore").html(options.moreText);
|
||||
|
||||
$("." + "divgrow-obj-" + divgrowid).toggle(function () {
|
||||
//alert(obj.attr('class'));
|
||||
// Set the height from the elements rel value
|
||||
//var height = $(this).prevAll("div:first").attr('rel');
|
||||
|
||||
var fullHeight = $(this).prevAll("div:first")[0].scrollHeight + 10;
|
||||
$(this).prevAll("div:first").animate({ height: fullHeight + "px" }, options.speed, function () { // Animation complete.
|
||||
|
||||
// Hide the overlay text when expanded, change the link text
|
||||
if (options.showBrackets) {
|
||||
$(this).nextAll("p.divgrow-brackets:first").fadeOut();
|
||||
}
|
||||
$(this).nextAll("a.divgrow-showmore:first").html(options.lessText);
|
||||
|
||||
});
|
||||
|
||||
|
||||
}, function () {
|
||||
|
||||
$(this).prevAll("div:first").stop(true, false).animate({ height: options.initialHeight }, options.speed, function () { // Animation complete.
|
||||
|
||||
// show the overlay text while closed, change the link text
|
||||
if (options.showBrackets) {
|
||||
$(this).nextAll("p.divgrow-brackets:first").stop(true, false).fadeIn();
|
||||
}
|
||||
$(this).nextAll("a.divgrow-showmore:first").stop(true, false).html(options.moreText);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
30
view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js
vendored
Normal file
30
view/theme/frost-mobile/js/jquery.divgrow-1.3.1.f1.min.js
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Simon Hibbard
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*//*
|
||||
* Version: V1.3.1-f1
|
||||
* Release: 22-12-2010
|
||||
* Based on jQuery 1.4.2
|
||||
*
|
||||
* 2012-10-29: Modified by Zach Prezkuta to allow dynamic full heights
|
||||
*/(function(e){var t=0;e.fn.divgrow=function(n){var n=e.extend({},{initialHeight:100,moreText:"+ Show More",lessText:"- Show Less",speed:1e3,showBrackets:!0},n);return this.each(function(){t++,obj=e(this),obj.css("height",n.initialHeight).css("overflow","hidden"),n.showBrackets?obj.after('<p class="divgrow-brackets">[…]</p><a href="#" class="divgrow-showmore divgrow-obj-'+t+'"'+"></a>"):obj.after('<a href="#" class="divgrow-showmore divgrow-obj-'+t+'"'+"></a>"),e("a.divgrow-showmore").html(n.moreText),e(".divgrow-obj-"+t).toggle(function(){var t=e(this).prevAll("div:first")[0].scrollHeight+10;e(this).prevAll("div:first").animate({height:t+"px"},n.speed,function(){n.showBrackets&&e(this).nextAll("p.divgrow-brackets:first").fadeOut(),e(this).nextAll("a.divgrow-showmore:first").html(n.lessText)})},function(){e(this).prevAll("div:first").stop(!0,!1).animate({height:n.initialHeight},n.speed,function(){n.showBrackets&&e(this).nextAll("p.divgrow-brackets:first").stop(!0,!1).fadeIn(),e(this).nextAll("a.divgrow-showmore:first").stop(!0,!1).html(n.moreText)})})})}})(jQuery);
|
||||
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
msie = $j.browser.msie ;
|
||||
|
||||
collapseHeight();
|
||||
|
||||
/* setup tooltips *//*
|
||||
$j("a,.tt").each(function(){
|
||||
var e = $j(this);
|
||||
|
|
@ -333,20 +335,7 @@
|
|||
});
|
||||
|
||||
|
||||
var bimgs = $j(".wall-item-body > img").not(function() { return this.complete; });
|
||||
var bimgcount = bimgs.length;
|
||||
|
||||
if (bimgcount) {
|
||||
bimgs.load(function() {
|
||||
bimgcount--;
|
||||
if (! bimgcount) {
|
||||
collapseHeight();
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
collapseHeight();
|
||||
}
|
||||
collapseHeight();
|
||||
|
||||
// reset vars for inserting individual items
|
||||
|
||||
|
|
@ -385,14 +374,18 @@
|
|||
});
|
||||
}
|
||||
|
||||
function collapseHeight() {
|
||||
$j(".wall-item-body").each(function() {
|
||||
if($j(this).height() > 310) {
|
||||
if(! $j(this).hasClass('divmore')) {
|
||||
$j(this).divgrow({ initialHeight: 300, showBrackets: false, speed: 0 });
|
||||
$j(this).addClass('divmore');
|
||||
}
|
||||
}
|
||||
function collapseHeight(elems) {
|
||||
var elemName = '.wall-item-body:not(.divmore)';
|
||||
if(typeof elems != 'undefined') {
|
||||
elemName = elems + ' ' + elemName;
|
||||
}
|
||||
$j(elemName).each(function() {
|
||||
if($j(this).height() > 350) {
|
||||
$j('html').height($j('html').height());
|
||||
$j(this).divgrow({ initialHeight: 300, showBrackets: false, speed: 0 });
|
||||
$j(this).addClass('divmore');
|
||||
$j('html').height('auto');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -542,6 +535,7 @@
|
|||
else {
|
||||
$j("#collapsed-comments-" + id).show();
|
||||
$j("#hide-comments-" + id).html(window.showFewer);
|
||||
collapseHeight("#collapsed-comments-" + id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
view/theme/frost-mobile/js/main.min.js
vendored
2
view/theme/frost-mobile/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -9,7 +9,7 @@ $j(document).ready(function() {
|
|||
case 'jot-header':
|
||||
var uploader = new window.AjaxUpload(
|
||||
'wall-image-upload',
|
||||
{ action: 'wall_upload/'+window.nickname,
|
||||
{ action: 'wall_upload/'+window.nickname+'?nomce=1',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $j('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
|
|
@ -21,7 +21,7 @@ $j(document).ready(function() {
|
|||
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
'wall-file-upload',
|
||||
{ action: 'wall_attach/'+window.nickname,
|
||||
{ action: 'wall_attach/'+window.nickname+'?nomce=1',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $j('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
|
|
@ -34,7 +34,7 @@ $j(document).ready(function() {
|
|||
case 'msg-header':
|
||||
var uploader = new window.AjaxUpload(
|
||||
'prvmail-upload',
|
||||
{ action: 'wall_upload/' + window.nickname,
|
||||
{ action: 'wall_upload/'+window.nickname+'?nomce=1',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $j('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
|
|
@ -251,14 +251,14 @@ function insertFormatting(comment,BBcode,id) {
|
|||
textarea.focus();
|
||||
selected = document.selection.createRange();
|
||||
if (BBcode == "url"){
|
||||
selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
|
||||
selected.text = "["+BBcode+"=http://]" + selected.text + "[/"+BBcode+"]";
|
||||
} else
|
||||
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
|
||||
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
|
||||
var start = textarea.selectionStart;
|
||||
var end = textarea.selectionEnd;
|
||||
if (BBcode == "url"){
|
||||
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
|
||||
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"=http://]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
|
||||
} else
|
||||
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
|
||||
}
|
||||
|
|
|
|||
2
view/theme/frost-mobile/js/theme.min.js
vendored
2
view/theme/frost-mobile/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue