allow theme selection
This commit is contained in:
parent
7501717d2e
commit
cc8a11eee2
6
boot.php
6
boot.php
@ -405,8 +405,9 @@ if(! class_exists('App')) {
|
|||||||
|
|
||||||
|
|
||||||
public $account = null; // account record
|
public $account = null; // account record
|
||||||
private $channel = null; // channel record
|
public $channel = null; // channel record
|
||||||
private $observer = null; // xchan record
|
public $observer = null; // xchan record
|
||||||
|
|
||||||
private $perms = null; // observer permissions
|
private $perms = null; // observer permissions
|
||||||
private $widgets = array(); // widgets for this page
|
private $widgets = array(); // widgets for this page
|
||||||
|
|
||||||
@ -440,6 +441,7 @@ if(! class_exists('App')) {
|
|||||||
public $identities;
|
public $identities;
|
||||||
public $css_sources = array();
|
public $css_sources = array();
|
||||||
public $js_sources = array();
|
public $js_sources = array();
|
||||||
|
public $theme_info = array();
|
||||||
|
|
||||||
public $nav_sel;
|
public $nav_sel;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ function admin_page_site_post(&$a){
|
|||||||
$ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False);
|
$ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False);
|
||||||
$diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False);
|
$diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False);
|
||||||
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
|
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
|
||||||
|
/*
|
||||||
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
|
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
|
||||||
if($ssl_policy == SSL_POLICY_FULL) {
|
if($ssl_policy == SSL_POLICY_FULL) {
|
||||||
q("update `contact` set
|
q("update `contact` set
|
||||||
@ -301,6 +301,7 @@ function admin_page_site_post(&$a){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
set_config('system','ssl_policy',$ssl_policy);
|
set_config('system','ssl_policy',$ssl_policy);
|
||||||
set_config('system','delivery_interval',$delivery_interval);
|
set_config('system','delivery_interval',$delivery_interval);
|
||||||
set_config('system','poll_interval',$poll_interval);
|
set_config('system','poll_interval',$poll_interval);
|
||||||
@ -874,8 +875,8 @@ function admin_page_themes(&$a){
|
|||||||
if($files) {
|
if($files) {
|
||||||
foreach($files as $file) {
|
foreach($files as $file) {
|
||||||
$f = basename($file);
|
$f = basename($file);
|
||||||
$is_experimental = intval(file_exists($file . '/experimental'));
|
$is_experimental = intval(file_exists($file . '/.experimental'));
|
||||||
$is_supported = 1-(intval(file_exists($file . '/unsupported'))); // Is not used yet
|
$is_supported = 1-(intval(file_exists($file . '/.unsupported'))); // Is not used yet
|
||||||
$is_allowed = intval(in_array($f,$allowed_themes));
|
$is_allowed = intval(in_array($f,$allowed_themes));
|
||||||
$themes[] = array('name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed);
|
$themes[] = array('name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed);
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ function channel_content(&$a, $update = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require_once("include/bbcode.php");
|
require_once("include/bbcode.php");
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
|
|
||||||
function get_theme_config_file($theme){
|
function get_theme_config_file($theme){
|
||||||
$a = get_app();
|
|
||||||
$base_theme = $a->theme_info['extends'];
|
$base_theme = get_app()->theme_info['extends'];
|
||||||
|
|
||||||
if (file_exists("view/theme/$theme/php/config.php")){
|
if (file_exists("view/theme/$theme/php/config.php")){
|
||||||
return "view/theme/$theme/php/config.php";
|
return "view/theme/$theme/php/config.php";
|
||||||
}
|
}
|
||||||
//if (file_exists("view/theme/$base_theme/php/config.php")){
|
if (file_exists("view/theme/$base_theme/php/config.php")){
|
||||||
// return "view/theme/$base_theme/php/config.php";
|
return "view/theme/$base_theme/php/config.php";
|
||||||
//}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ function settings_post(&$a) {
|
|||||||
|
|
||||||
check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
|
check_form_security_token_redirectOnErr('/settings/display', 'settings_display');
|
||||||
|
|
||||||
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->user['theme']);
|
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->channel['channel_theme']);
|
||||||
$mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme'])) : '');
|
$mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme'])) : '');
|
||||||
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
|
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
|
||||||
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
|
$browser_update = ((x($_POST,'browser_update')) ? intval($_POST['browser_update']) : 0);
|
||||||
@ -201,7 +201,7 @@ function settings_post(&$a) {
|
|||||||
set_pconfig(local_user(),'system','no_smilies',$nosmile);
|
set_pconfig(local_user(),'system','no_smilies',$nosmile);
|
||||||
|
|
||||||
|
|
||||||
if ($theme == $a->user['theme']){
|
if ($theme == $a->channel['channel_theme']){
|
||||||
// call theme_post only if theme has not been changed
|
// call theme_post only if theme has not been changed
|
||||||
if( ($themeconfigfile = get_theme_config_file($theme)) != null){
|
if( ($themeconfigfile = get_theme_config_file($theme)) != null){
|
||||||
require_once($themeconfigfile);
|
require_once($themeconfigfile);
|
||||||
@ -209,8 +209,7 @@ function settings_post(&$a) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$r = q("UPDATE channel SET channel_theme = '%s' WHERE channel_id = %d LIMIT 1",
|
||||||
$r = q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d LIMIT 1",
|
|
||||||
dbesc($theme),
|
dbesc($theme),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
|
BIN
view/img/dicons.png
Normal file
BIN
view/img/dicons.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
view/img/notifications.png
Normal file
BIN
view/img/notifications.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
14
view/nb-no/follow_notify_eml.tpl
Normal file
14
view/nb-no/follow_notify_eml.tpl
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
Kjære $[myname],
|
||||||
|
|
||||||
|
Du har en ny følgesvenn på $[sitename] - '$[requestor]'.
|
||||||
|
|
||||||
|
Du kan besøke profilen deres på $[url].
|
||||||
|
|
||||||
|
Vennligst logg inn på ditt sted for å godkjenne eller ignorere/avbryte forespørselen.
|
||||||
|
|
||||||
|
$[siteurl]
|
||||||
|
|
||||||
|
Med vennlig hilsen,
|
||||||
|
|
||||||
|
$[sitename] administrator
|
22
view/nb-no/friend_complete_eml.tpl
Normal file
22
view/nb-no/friend_complete_eml.tpl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
Kjære $[username],
|
||||||
|
|
||||||
|
Gode nyheter... '$[fn]' ved '$[dfrn_url]' har godtatt
|
||||||
|
din forespørsel om kobling hos '$[sitename]'.
|
||||||
|
|
||||||
|
Dere er nå gjensidige venner og kan utveksle statusoppdateringer, bilder og e-post
|
||||||
|
uten hindringer.
|
||||||
|
|
||||||
|
Vennligst besøk din side "Kontakter" ved $[sitename] hvis du ønsker å gjøre
|
||||||
|
noen endringer på denne forbindelsen.
|
||||||
|
|
||||||
|
$[siteurl]
|
||||||
|
|
||||||
|
[For eksempel, så kan du lage en egen profil med informasjon som ikke er
|
||||||
|
tilgjengelig for alle - og angi visningsrettigheter til '$[fn]'].
|
||||||
|
|
||||||
|
Med vennlig hilsen,
|
||||||
|
|
||||||
|
$[sitename] administrator
|
||||||
|
|
||||||
|
|
22
view/nb-no/intro_complete_eml.tpl
Normal file
22
view/nb-no/intro_complete_eml.tpl
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
Kjære $[username],
|
||||||
|
|
||||||
|
'$[fn]' ved '$[dfrn_url]' har godtatt
|
||||||
|
din forespørsel om kobling ved $[sitename]'.
|
||||||
|
|
||||||
|
'$[fn]' har valgt å godta deg som "fan", som begrenser
|
||||||
|
noen typer kommunikasjon - slik som private meldinger og noen profilhandlinger.
|
||||||
|
Hvis dette er en kjendis- eller forumside, så ble disse innstillingene
|
||||||
|
angitt automatisk.
|
||||||
|
|
||||||
|
'$[fn]' kan velge å utvide dette til en to-veis eller mer åpen
|
||||||
|
forbindelse i fremtiden.
|
||||||
|
|
||||||
|
Du vil nå motta offentlige statusoppdateringer fra '$[fn]',
|
||||||
|
som vil vises på din "Nettverk"-side ved
|
||||||
|
|
||||||
|
$[siteurl]
|
||||||
|
|
||||||
|
Med vennlig hilsen,
|
||||||
|
|
||||||
|
$[sitename] administrator
|
32
view/nb-no/lostpass_eml.tpl
Normal file
32
view/nb-no/lostpass_eml.tpl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
Kjære $[username],
|
||||||
|
En forespørsel ble nylig mottatt hos $[sitename] om å tilbakestille din kontos
|
||||||
|
passord. For å godkjenne denne forespørselen, vennligst velg bekreftelseslenken
|
||||||
|
nedenfor eller lim den inn på adresselinjen i nettleseren din.
|
||||||
|
|
||||||
|
Hvis du IKKE har spurt om denne endringen, vennligst IKKE følg lenken
|
||||||
|
som er oppgitt og ignorer og/eller slett denne e-posten.
|
||||||
|
|
||||||
|
Passordet ditt vil ikke bli endret med mindre vi kan forsikre oss om at du
|
||||||
|
sendte denne forespørselen.
|
||||||
|
|
||||||
|
Følg denne lenken for å bekrefte din identitet:
|
||||||
|
|
||||||
|
$[reset_link]
|
||||||
|
|
||||||
|
Du vil da motta en oppfølgings melding med det nye passordet.
|
||||||
|
|
||||||
|
Du kan endre passordet på siden for dine kontoinnstillinger etter innlogging.
|
||||||
|
|
||||||
|
Innloggingsdetaljene er som følger:
|
||||||
|
|
||||||
|
Nettstedsadresse:»$[siteurl]
|
||||||
|
Brukernavn:»$[email]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Beste hilsen,
|
||||||
|
$[sitename] administrator
|
||||||
|
|
||||||
|
|
8765
view/nb-no/messages.po
Normal file
8765
view/nb-no/messages.po
Normal file
File diff suppressed because it is too large
Load Diff
20
view/nb-no/passchanged_eml.tpl
Normal file
20
view/nb-no/passchanged_eml.tpl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
Kjære $[username],
|
||||||
|
Ditt passord har blitt endret som forespurt. Vennligst ta vare på denne
|
||||||
|
meldingen for sikkerhets skyld (eller bytt passordet ditt umiddelbart til
|
||||||
|
noe du husker).
|
||||||
|
|
||||||
|
|
||||||
|
Dine logg inn-detaljer er som følger:
|
||||||
|
|
||||||
|
Nettsted:»$[siteurl]
|
||||||
|
Brukernavn:»$[email]
|
||||||
|
Passord:»$[new_password]
|
||||||
|
|
||||||
|
Du kan endre dette passordet på din side for kontoinnstillinger etter innlogging.
|
||||||
|
|
||||||
|
|
||||||
|
Med vennlig hilsen,
|
||||||
|
$[sitename] administrator
|
||||||
|
|
||||||
|
|
34
view/nb-no/register_open_eml.tpl
Normal file
34
view/nb-no/register_open_eml.tpl
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
Kjære $[username],
|
||||||
|
Takk for at du registrerte deg hos $[sitename]. Kontoen din er opprettet.
|
||||||
|
Innloggingsdetaljene er som følger:
|
||||||
|
|
||||||
|
|
||||||
|
Nettstedsadresse:»$[siteurl]
|
||||||
|
Brukernavn:»$[email]
|
||||||
|
Passord:»$[password]
|
||||||
|
|
||||||
|
Du kan endre passordet ditt på siden "Innstillinger" etter at du har logget
|
||||||
|
inn.
|
||||||
|
|
||||||
|
Vennligst bruk litt tid til å se over de andre kontoinnstillingene på den siden.
|
||||||
|
|
||||||
|
Du vil antakelig ønske å legge til litt grunnleggende informasjon til standardprofilen din
|
||||||
|
(på siden "Profiler") slik at folk lettere kan finne deg.
|
||||||
|
|
||||||
|
Vi anbefaler å oppgi fullt navn, legge til et profilbilde,
|
||||||
|
legge til noen "nøkkelord" for profilen (svært nyttig for å få nye venner) - og
|
||||||
|
kanskje hvilket land du bor i, hvis du ikke ønsker å være mer spesifikk
|
||||||
|
enn det.
|
||||||
|
|
||||||
|
Vi respekterer ditt privatliv fullt ut, og ingen av disse elementene er nødvendige.
|
||||||
|
Hvis du er ny og ikke kjenner noen her, så kan de hjelpe
|
||||||
|
deg å få noen nye og interessante venner.
|
||||||
|
|
||||||
|
|
||||||
|
Takk og velkommen til $[sitename].
|
||||||
|
|
||||||
|
Beste hilsen,
|
||||||
|
$[sitename] administrator
|
||||||
|
|
||||||
|
|
25
view/nb-no/register_verify_eml.tpl
Normal file
25
view/nb-no/register_verify_eml.tpl
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
En ny forespørsel om brukerregistering ble mottatt hos $[sitename] og krever
|
||||||
|
din godkjenning.
|
||||||
|
|
||||||
|
|
||||||
|
Innloggingsdetaljene er som følger:
|
||||||
|
|
||||||
|
Fullt navn:»$[username]
|
||||||
|
Nettstedsadresse:»$[siteurl]
|
||||||
|
Brukernavn:»$[email]
|
||||||
|
|
||||||
|
|
||||||
|
For å godkjenne denne forespørselen, vennligst besøk følgende lenke:
|
||||||
|
|
||||||
|
|
||||||
|
$[siteurl]/regmod/allow/$[hash]
|
||||||
|
|
||||||
|
|
||||||
|
For å avslå denne forespørselen og fjerne kontoen, vennligst besøk:
|
||||||
|
|
||||||
|
|
||||||
|
$[siteurl]/regmod/deny/$[hash]
|
||||||
|
|
||||||
|
|
||||||
|
Mange takk.
|
17
view/nb-no/request_notify_eml.tpl
Normal file
17
view/nb-no/request_notify_eml.tpl
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Kjære $[myname],
|
||||||
|
|
||||||
|
Du har akkurat mottatt en kontaktforespørsel hos $[sitename]
|
||||||
|
|
||||||
|
fra '$[requestor]'.
|
||||||
|
|
||||||
|
Du kan besøke profilen på $[url].
|
||||||
|
|
||||||
|
Vennligst logg inn på ditt nettsted for å se hele introduksjonen
|
||||||
|
og godkjenne eller ignorere/avbryte forespørselen.
|
||||||
|
|
||||||
|
$[siteurl]
|
||||||
|
|
||||||
|
Beste hilsen,
|
||||||
|
|
||||||
|
$[siteurl] administrator
|
2006
view/nb-no/strings.php
Normal file
2006
view/nb-no/strings.php
Normal file
File diff suppressed because it is too large
Load Diff
11
view/nb-no/update_fail_eml.tpl
Normal file
11
view/nb-no/update_fail_eml.tpl
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
Hei,
|
||||||
|
jeg er $sitename.
|
||||||
|
Friendica-utviklerne slapp nylig oppdateringen $update,
|
||||||
|
men da jeg prøvde å installere den, gikk noe forferdelig galt.
|
||||||
|
Dette trenger å bli fikset raskt og jeg kan ikke gjøre det alene. Vennligst kontakt en
|
||||||
|
Friendica-utvikler hvis du ikke kan hjelpe meg på egenhånd. Databasen min er kanskje ugyldig.
|
||||||
|
|
||||||
|
Feilmeldingen er '$error'.
|
||||||
|
|
||||||
|
Jeg beklager,
|
||||||
|
din Friendica-tjener hos $siteurl
|
89
view/theme/redbasic/js/redbasic.js
Normal file
89
view/theme/redbasic/js/redbasic.js
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
|
||||||
|
function insertFormatting(comment,BBcode,id) {
|
||||||
|
|
||||||
|
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||||
|
if(tmpStr == comment) {
|
||||||
|
tmpStr = "";
|
||||||
|
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||||
|
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||||
|
openMenu("comment-edit-submit-wrapper-" + id);
|
||||||
|
$("#comment-edit-text-" + id).val(tmpStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea = document.getElementById("comment-edit-text-" +id);
|
||||||
|
if (document.selection) {
|
||||||
|
textarea.focus();
|
||||||
|
selected = document.selection.createRange();
|
||||||
|
if (BBcode == "url"){
|
||||||
|
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);
|
||||||
|
} else
|
||||||
|
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cmtBbOpen(comment, id) {
|
||||||
|
if($(comment).hasClass('comment-edit-text-full')) {
|
||||||
|
$(".comment-edit-bb-" + id).show();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function cmtBbClose(comment, id) {
|
||||||
|
// if($(comment).hasClass('comment-edit-text-empty')) {
|
||||||
|
// $(".comment-edit-bb-" + id).hide();
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('.group-edit-icon').hover(
|
||||||
|
function() {
|
||||||
|
$(this).addClass('icon'); $(this).removeClass('iconspacer');},
|
||||||
|
function() {
|
||||||
|
$(this).removeClass('icon'); $(this).addClass('iconspacer');}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.sidebar-group-element').hover(
|
||||||
|
function() {
|
||||||
|
id = $(this).attr('id');
|
||||||
|
$('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
|
||||||
|
|
||||||
|
function() {
|
||||||
|
id = $(this).attr('id');
|
||||||
|
$('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$('.savedsearchdrop').hover(
|
||||||
|
function() {
|
||||||
|
$(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
|
||||||
|
function() {
|
||||||
|
$(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.savedsearchterm').hover(
|
||||||
|
function() {
|
||||||
|
id = $(this).attr('id');
|
||||||
|
$('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
|
||||||
|
|
||||||
|
function() {
|
||||||
|
id = $(this).attr('id');
|
||||||
|
$('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
|
||||||
|
);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,94 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$a->theme_info = array();
|
|
||||||
|
|
||||||
function duepuntozero_init(&$a) {
|
function redbasic_init(&$a) {
|
||||||
$a->page['htmlhead'] .= <<< EOT
|
head_add_js('redbasic.js');
|
||||||
<script>
|
|
||||||
function insertFormatting(comment,BBcode,id) {
|
|
||||||
|
|
||||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
|
||||||
if(tmpStr == comment) {
|
|
||||||
tmpStr = "";
|
|
||||||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
|
||||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
|
||||||
openMenu("comment-edit-submit-wrapper-" + id);
|
|
||||||
$("#comment-edit-text-" + id).val(tmpStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea = document.getElementById("comment-edit-text-" +id);
|
|
||||||
if (document.selection) {
|
|
||||||
textarea.focus();
|
|
||||||
selected = document.selection.createRange();
|
|
||||||
if (BBcode == "url"){
|
|
||||||
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);
|
|
||||||
} else
|
|
||||||
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function cmtBbOpen(comment, id) {
|
|
||||||
if($(comment).hasClass('comment-edit-text-full')) {
|
|
||||||
$(".comment-edit-bb-" + id).show();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
function cmtBbClose(comment, id) {
|
|
||||||
// if($(comment).hasClass('comment-edit-text-empty')) {
|
|
||||||
// $(".comment-edit-bb-" + id).hide();
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
$('.group-edit-icon').hover(
|
|
||||||
function() {
|
|
||||||
$(this).addClass('icon'); $(this).removeClass('iconspacer');},
|
|
||||||
function() {
|
|
||||||
$(this).removeClass('icon'); $(this).addClass('iconspacer');}
|
|
||||||
);
|
|
||||||
|
|
||||||
$('.sidebar-group-element').hover(
|
|
||||||
function() {
|
|
||||||
id = $(this).attr('id');
|
|
||||||
$('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
|
|
||||||
|
|
||||||
function() {
|
|
||||||
id = $(this).attr('id');
|
|
||||||
$('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
$('.savedsearchdrop').hover(
|
|
||||||
function() {
|
|
||||||
$(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
|
|
||||||
function() {
|
|
||||||
$(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
|
|
||||||
);
|
|
||||||
|
|
||||||
$('.savedsearchterm').hover(
|
|
||||||
function() {
|
|
||||||
id = $(this).attr('id');
|
|
||||||
$('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
|
|
||||||
|
|
||||||
function() {
|
|
||||||
id = $(this).attr('id');
|
|
||||||
$('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
|
|
||||||
);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
EOT;
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user