1
0
Fork 0

Merge branch 'develop' into improvement/frio-action-links-to-buttons

# Conflicts:
#	view/theme/frio/templates/search_item.tpl
#	view/theme/frio/templates/wall_thread.tpl
This commit is contained in:
Hypolite Petovan 2017-03-14 10:45:17 -04:00
commit 79f14749df
55 changed files with 13809 additions and 13796 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -56,7 +56,6 @@
{{include file="field_select.tpl" field=$theme_mobile}}
{{include file="field_select.tpl" field=$ssl_policy}}
{{if $ssl_policy.2 == 1}}{{include file="field_checkbox.tpl" field=$force_ssl}}{{/if}}
{{include file="field_checkbox.tpl" field=$old_share}}
{{include file="field_checkbox.tpl" field=$hide_help}}
{{include file="field_select.tpl" field=$singleuser}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
@ -132,7 +131,6 @@
{{include file="field_input.tpl" field=$lockpath}}
{{include file="field_input.tpl" field=$temppath}}
{{include file="field_input.tpl" field=$basepath}}
{{include file="field_checkbox.tpl" field=$suppress_language}}
{{include file="field_checkbox.tpl" field=$suppress_tags}}
{{include file="field_checkbox.tpl" field=$nodeinfo}}
{{include file="field_input.tpl" field=$embedly}}
@ -153,7 +151,6 @@
{{include file="field_input.tpl" field=$itemcache_duration}}
{{include file="field_input.tpl" field=$max_comments}}
{{include file="field_checkbox.tpl" field=$proxy_disabled}}
{{include file="field_checkbox.tpl" field=$old_pager}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit|escape:'html'}}" /></div>
<h3>{{$worker_title}}</h3>

View file

@ -1,5 +1,9 @@
<div class="intro-approve-as-friend-desc">{{$approve_as}}</div>
<div class="intro-approve-as-friend-desc">
<p>{{$approve_as1}}</p>
<p>{{$approve_as2}}</p>
<p>{{$approve_as3}}</p>
</div>
<div class="intro-approve-as-friend-wrapper">
<label class="intro-approve-as-friend-label" for="intro-approve-as-friend-{{$intro_id}}">{{$as_friend}}</label>

View file

@ -2,7 +2,7 @@
{{if $pager}}
{{if $pager.prev}}<span class="pager_prev {{$pager.prev.class}}"><a href="{{$pager.prev.url}}">{{$pager.prev.text}}</a></span>{{/if}}
{{if $pager.first}}<span class="pager_first $pager.first.class"><a href="{{$pager.first.url}}">{{$pager.first.text}}</a></span>{{/if}}
{{if $pager.first}}<span class="pager_first {{$pager.first.class}}"><a href="{{$pager.first.url}}">{{$pager.first.text}}</a></span>{{/if}}
{{foreach $pager.pages as $p}}<span class="pager_{{$p.class}}"><a href="{{$p.url}}">{{$p.text}}</a></span>{{/foreach}}

View file

@ -1552,6 +1552,9 @@ blockquote.shared_content {
clear:left;
}
.pager .disabled {
display: none;
}
.pager_first,
.pager_last,

View file

@ -2514,6 +2514,24 @@ body .tread-wrapper .hovercard:hover .hover-card-content a {
color: $link_color !important;
}
/* Pagination improvements */
.pagination > li > a,
.pagination > li > span {
color: $link_color;
}
.pagination>.active>a,
.pagination>.active>a:focus,
.pagination>.active>a:hover,
.pagination>.active>span,
.pagination>.active>span:focus,
.pagination>.active>span:hover {
background-color: $link_color;
border-color: $link_color;
}
.disabled > a {
pointer-events: none;
}
/*
* some temporary workarounds until this will solved
* elsewhere (e.g. new templates)

View file

@ -4,8 +4,9 @@
// Catch the GUID from the URL
var itemGuid = window.location.pathname.split("/").pop();
var itemGuidSafe = itemGuid.replace(/%.*/, '');
$(window).load(function(){
// Scroll to the Item by its GUID
scrollToItem('item-'+itemGuid);
scrollToItem('item-' + itemGuidSafe);
});

View file

@ -162,21 +162,29 @@ function qCommentInsert(obj,id) {
function confirmDelete() { return confirm(aStr.delitem); }
function dropItem(url, object) {
/**
* Hide and removes an item element from the DOM after the deletion url is
* successful, restore it else.
*
* @param {string} url The item removal URL
* @param {string} elementId The DOM id of the item element
* @returns {undefined}
*/
function dropItem(url, elementId) {
var confirm = confirmDelete();
//if the first character of the object is #, remove it because
// we use getElementById which don't need the #
// getElementByID selects elements even if there are special characters
// in the ID (like %) which won't work with jQuery
/// @todo ceck if we can solve this in the template
object = object.indexOf('#') == 0 ? object.substring(1) : object;
if(confirm) {
if (confirm) {
$('body').css('cursor', 'wait');
$(document.getElementById(object)).fadeTo('fast', 0.33, function () {
$.get(url).done(function() {
$(document.getElementById(object)).remove();
var $el = $(document.getElementById(elementId));
$el.fadeTo('fast', 0.33, function () {
$.get(url).then(function() {
$el.remove();
}).error(function() {
// @todo Show related error message
$el.show();
}).always(function() {
$('body').css('cursor', 'auto');
});
});

View file

@ -573,31 +573,38 @@ String.prototype.rtrim = function() {
return trimmed;
};
// Scroll to a specific item and highlight it
// Note: jquery.color.js is needed
function scrollToItem(itemID) {
if( typeof itemID === "undefined")
/**
* Scroll the screen to the item element whose id is provided, then highlights it
*
* Note: jquery.color.js is required
*
* @param {string} elementId The item element id
* @returns {undefined}
*/
function scrollToItem(elementId) {
if (typeof elementId === "undefined") {
return;
}
var elm = $('#'+itemID);
var $el = $(document.getElementById(elementId));
// Test if the Item exists
if(!elm.length)
if (!$el.length) {
return;
}
// Define the colors which are used for highlighting
var colWhite = {backgroundColor:'#F5F5F5'};
var colShiny = {backgroundColor:'#FFF176'};
// Get the Item Position (we need to substract 100 to match
// correct position
var itemPos = $(elm).offset().top - 100;
// Get the Item Position (we need to substract 100 to match correct position
var itemPos = $el.offset().top - 100;
// Scroll to the DIV with the ID (GUID)
$('html, body').animate({
scrollTop: itemPos
}, 400, function() {
// Highlight post/commenent with ID (GUID)
$(elm).animate(colWhite, 1000).animate(colShiny).animate(colWhite, 600);
$el.animate(colWhite, 1000).animate(colShiny).animate(colWhite, 600);
});
}

View file

@ -1,292 +0,0 @@
<?php
class colors {
/* Convert hexdec color string to rgb(a) string */
function hex2rgba($color, $opacity = false) {
$default = 'rgb(0,0,0)';
//Return default if no color provided
if(empty($color))
return $default;
//Sanitize $color if "#" is provided
if ($color[0] == '#' ) {
$color = substr( $color, 1 );
}
//Check if color has 6 or 3 characters and get values
if (strlen($color) == 6) {
$hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
} elseif ( strlen( $color ) == 3 ) {
$hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
} else {
return $default;
}
//Convert hexadec to rgb
$rgb = array_map('hexdec', $hex);
//Check if opacity is set(rgba or rgb)
if($opacity){
if(abs($opacity) > 1)
$opacity = 1.0;
$output = 'rgba('.implode(",",$rgb).','.$opacity.')';
} else {
$output = 'rgb('.implode(",",$rgb).')';
}
//Return rgb(a) color string
return $output;
}
function hex2rgb( $colour ) {
if ( $colour[0] == '#' ) {
$colour = substr( $colour, 1 );
}
if ( strlen( $colour ) == 6 ) {
list( $r, $g, $b ) = array( $colour[0] . $colour[1], $colour[2] . $colour[3], $colour[4] . $colour[5] );
} elseif ( strlen( $colour ) == 3 ) {
list( $r, $g, $b ) = array( $colour[0] . $colour[0], $colour[1] . $colour[1], $colour[2] . $colour[2] );
} else {
return false;
}
$r = hexdec( $r );
$g = hexdec( $g );
$b = hexdec( $b );
return array( 'red' => $r, 'green' => $g, 'blue' => $b );
}
function rgbToHsl( $r, $g, $b ) {
$oldR = $r;
$oldG = $g;
$oldB = $b;
$r /= 255;
$g /= 255;
$b /= 255;
$max = max( $r, $g, $b );
$min = min( $r, $g, $b );
$h;
$s;
$l = ( $max + $min ) / 2;
$d = $max - $min;
if( $d == 0 ){
$h = $s = 0; // achromatic
} else {
$s = $d / ( 1 - abs( 2 * $l - 1 ) );
switch( $max ){
case $r:
$h = 60 * fmod( ( ( $g - $b ) / $d ), 6 );
if ($b > $g) {
$h += 360;
}
break;
case $g:
$h = 60 * ( ( $b - $r ) / $d + 2 );
break;
case $b:
$h = 60 * ( ( $r - $g ) / $d + 4 );
break;
}
}
return array( round( $h, 2 ), round( $s, 2 ), round( $l, 2 ) );
}
function hslToRgb( $h, $s, $l ){
$r = "";
$g = "";
$b = "";
$c = ( 1 - abs( 2 * $l - 1 ) ) * $s;
$x = $c * ( 1 - abs( fmod( ( $h / 60 ), 2 ) - 1 ) );
$m = $l - ( $c / 2 );
if ( $h < 60 ) {
$r = $c;
$g = $x;
$b = 0;
} else if ( $h < 120 ) {
$r = $x;
$g = $c;
$b = 0;
} else if ( $h < 180 ) {
$r = 0;
$g = $c;
$b = $x;
} else if ( $h < 240 ) {
$r = 0;
$g = $x;
$b = $c;
} else if ( $h < 300 ) {
$r = $x;
$g = 0;
$b = $c;
} else {
$r = $c;
$g = 0;
$b = $x;
}
$r = ( $r + $m ) * 255;
$g = ( $g + $m ) * 255;
$b = ( $b + $m ) * 255;
return array( floor( $r ), floor( $g ), floor( $b ) );
}
/*
* Som more example code - this needs to be deletet if we don't need it in
* the future
*/
function HTMLToRGB($htmlCode)
{
if($htmlCode[0] == '#')
$htmlCode = substr($htmlCode, 1);
if (strlen($htmlCode) == 3)
{
$htmlCode = $htmlCode[0] . $htmlCode[0] . $htmlCode[1] . $htmlCode[1] . $htmlCode[2] . $htmlCode[2];
}
$r = hexdec($htmlCode[0] . $htmlCode[1]);
$g = hexdec($htmlCode[2] . $htmlCode[3]);
$b = hexdec($htmlCode[4] . $htmlCode[5]);
return $b + ($g << 0x8) + ($r << 0x10);
}
function RGBToHTML($RGB)
{
$r = 0xFF & ($RGB >> 0x10);
$g = 0xFF & ($RGB >> 0x8);
$b = 0xFF & $RGB;
$r = dechex($r);
$g = dechex($g);
$b = dechex($b);
return "#" . str_pad($r, 2, "0", STR_PAD_LEFT) . str_pad($g, 2, "0", STR_PAD_LEFT) . str_pad($b, 2, "0", STR_PAD_LEFT);
}
function ChangeLuminosity($RGB, $LuminosityPercent)
{
$HSL = RGBToHSL($RGB);
$NewHSL = (int)(((float)$LuminosityPercent / 100) * 255) + (0xFFFF00 & $HSL);
return HSLToRGB($NewHSL);
}
function RGBToHSL($RGB)
{
$r = 0xFF & ($RGB >> 0x10);
$g = 0xFF & ($RGB >> 0x8);
$b = 0xFF & $RGB;
$r = ((float)$r) / 255.0;
$g = ((float)$g) / 255.0;
$b = ((float)$b) / 255.0;
$maxC = max($r, $g, $b);
$minC = min($r, $g, $b);
$l = ($maxC + $minC) / 2.0;
if($maxC == $minC)
{
$s = 0;
$h = 0;
}
else
{
if($l < .5)
{
$s = ($maxC - $minC) / ($maxC + $minC);
}
else
{
$s = ($maxC - $minC) / (2.0 - $maxC - $minC);
}
if($r == $maxC)
$h = ($g - $b) / ($maxC - $minC);
if($g == $maxC)
$h = 2.0 + ($b - $r) / ($maxC - $minC);
if($b == $maxC)
$h = 4.0 + ($r - $g) / ($maxC - $minC);
$h = $h / 6.0;
}
$h = (int)round(255.0 * $h);
$s = (int)round(255.0 * $s);
$l = (int)round(255.0 * $l);
$HSL = $l + ($s << 0x8) + ($h << 0x10);
return $HSL;
}
function HSLToRGB($HSL)
{
$h = 0xFF & ($HSL >> 0x10);
$s = 0xFF & ($HSL >> 0x8);
$l = 0xFF & $HSL;
$h = ((float)$h) / 255.0;
$s = ((float)$s) / 255.0;
$l = ((float)$l) / 255.0;
if($s == 0)
{
$r = $l;
$g = $l;
$b = $l;
}
else
{
if($l < .5)
{
$t2 = $l * (1.0 + $s);
}
else
{
$t2 = ($l + $s) - ($l * $s);
}
$t1 = 2.0 * $l - $t2;
$rt3 = $h + 1.0/3.0;
$gt3 = $h;
$bt3 = $h - 1.0/3.0;
if($rt3 < 0) $rt3 += 1.0;
if($rt3 > 1) $rt3 -= 1.0;
if($gt3 < 0) $gt3 += 1.0;
if($gt3 > 1) $gt3 -= 1.0;
if($bt3 < 0) $bt3 += 1.0;
if($bt3 > 1) $bt3 -= 1.0;
if(6.0 * $rt3 < 1) $r = $t1 + ($t2 - $t1) * 6.0 * $rt3;
elseif(2.0 * $rt3 < 1) $r = $t2;
elseif(3.0 * $rt3 < 2) $r = $t1 + ($t2 - $t1) * ((2.0/3.0) - $rt3) * 6.0;
else $r = $t1;
if(6.0 * $gt3 < 1) $g = $t1 + ($t2 - $t1) * 6.0 * $gt3;
elseif(2.0 * $gt3 < 1) $g = $t2;
elseif(3.0 * $gt3 < 2) $g = $t1 + ($t2 - $t1) * ((2.0/3.0) - $gt3) * 6.0;
else $g = $t1;
if(6.0 * $bt3 < 1) $b = $t1 + ($t2 - $t1) * 6.0 * $bt3;
elseif(2.0 * $bt3 < 1) $b = $t2;
elseif(3.0 * $bt3 < 2) $b = $t1 + ($t2 - $t1) * ((2.0/3.0) - $bt3) * 6.0;
else $b = $t1;
}
$r = (int)round(255.0 * $r);
$g = (int)round(255.0 * $g);
$b = (int)round(255.0 * $b);
$RGB = $b + ($g << 0x8) + ($r << 0x10);
return $RGB;
}
}

View file

@ -0,0 +1,14 @@
{{* Pager template, uses output of paginate_data() in include/text.php *}}
{{if $pager}}
<div class="{{$pager.class}}">
{{if $pager.first}}<li class="pager_first {{$pager.first.class}}"><a href="{{$pager.first.url}}">{{$pager.first.text}}</a></li>{{/if}}
{{if $pager.prev}}<li class="pager_prev {{$pager.prev.class}}"><a href="{{$pager.prev.url}}">{{$pager.prev.text}}</a></li>{{/if}}
{{foreach $pager.pages as $p}}<li class="pager_{{$p.class}}"><a href="{{$p.url}}">{{$p.text}}</a></li>{{/foreach}}
{{if $pager.next}}<li class="pager_next {{$pager.next.class}}"><a href="{{$pager.next.url}}">{{$pager.next.text}}</a></li>{{/if}}
{{if $pager.last}}&nbsp;<li class="pager_last {{$pager.last.class}}"><a href="{{$pager.last.url}}">{{$pager.last.text}}</a></li>{{/if}}
</div>
{{/if}}

View file

@ -7,7 +7,7 @@
<!-- ./TODO => Unknow block -->
<div class="panel">
<div class="panel" id="item-{{$item.guid}}">
<div class="wall-item-container panel-body{{$item.indent}} {{$item.shiny}} {{$item.previewing}}" >
<div class="media">
{{* Put additional actions in a top-right dropdown menu *}}
@ -54,7 +54,7 @@
{{if $item.drop.dropping}}
<li role="separator" class="divider"></li>
<li role="menuitem">
<button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', '#item-{{$item.guid}}'); return false;" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</button>
<button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}'); return false;" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</button>
</li>
{{/if}}
</ul>

View file

@ -129,7 +129,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{if $item.drop.dropping}}
<li role="menuitem">
<button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', '#item-{{$item.guid}}'); return false;" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</button>
<button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}'); return false;" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</button>
</li>
{{/if}}
</ul>

View file

@ -1909,6 +1909,9 @@ input#profile-jot-email {
-webkit-border-radius: 10px;
}
.pager .disabled {
display: none;
}
.pager_first,
.pager_last,

View file

@ -1866,6 +1866,9 @@ input#dfrn-url {
-webkit-border-radius: 10px;
}
.pager .disabled {
display: none;
}
.pager_first,
.pager_last,

View file

@ -2481,6 +2481,9 @@ footer {
margin-top: 25px;
clear: both;
}
.pager .disabled {
display: none;
}
/**
* ADMIN
*/

View file

@ -2481,6 +2481,9 @@ footer {
margin-top: 25px;
clear: both;
}
.pager .disabled {
display: none;
}
/**
* ADMIN
*/

View file

@ -1675,6 +1675,9 @@ footer { height: 100px; display: table-row; }
margin-top: 25px;
clear: both;
}
.pager .disabled {
display: none;
}
/**
* ADMIN

View file

@ -396,6 +396,10 @@ ul.menu-popup li a:hover {
margin: 4px;
}
.pager .disabled {
display: none;
}
.pager_current {
background-color: #1873a2;
color: #ffffff;

View file

@ -247,6 +247,10 @@ div.pager {
float: left;
}
.pager .disabled {
display: none;
}
.hide-comments-outer {
margin-left: 80px;
margin-bottom: 5px;