Changeset 6379


Ignore:
Timestamp:
May 26, 2010, 10:36:12 PM (10 years ago)
Author:
nikrou
Message:

Fix bug 1700 : allow color with or without #

Location:
extensions/pwgCumulus
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/pwgCumulus/CHANGELOG

    r5504 r6379  
    1 pwgCumulus 0.4.0 - 2010-03-31
     1pwgCumulus 0.4.3 - 2010-05-26
     2================================
     3* Fix bug 1700 : allow color with or without #
     4
     5pwgCumulus 0.4.2 - 2010-03-31
    26================================
    37* fix missing root in archive
  • extensions/pwgCumulus/admin.php

    r5418 r6379  
    4747
    4848  if (!empty($_POST['pwg_cumulus_color1']) && trim($_POST['pwg_cumulus_color1'])!=$me->pwg_cumulus_color1) {
    49     $me->pwg_cumulus_color1 = $_POST['pwg_cumulus_color1'];
     49    $me->pwg_cumulus_color1 = str_replace('#', '', $_POST['pwg_cumulus_color1']);
    5050    array_push($GLOBALS['page']['infos'], $lang['Color 1 updated']);
    5151    $save_config = true;
    5252  }
    5353  if (!empty($_POST['pwg_cumulus_color2']) && trim($_POST['pwg_cumulus_color2'])!=$me->pwg_cumulus_color2) {
    54     $me->pwg_cumulus_color2 = $_POST['pwg_cumulus_color2'];
     54    $me->pwg_cumulus_color2 = str_replace('#', '', $_POST['pwg_cumulus_color2']);
    5555    array_push($GLOBALS['page']['infos'], $lang['Color 2 updated']);
    5656    $save_config = true;
    5757  }
    5858  if (!empty($_POST['pwg_cumulus_hicolor']) && trim($_POST['pwg_cumulus_hicolor'])!=$me->pwg_cumulus_hicolor) {
    59     $me->pwg_cumulus_hicolor = $_POST['pwg_cumulus_hicolor'];
     59    $me->pwg_cumulus_hicolor = str_replace('#', '', $_POST['pwg_cumulus_hicolor']);
    6060    array_push($GLOBALS['page']['infos'], $lang['Mouseover color updated']);
    6161    $save_config = true;
  • extensions/pwgCumulus/main.inc.php

    r5504 r6379  
    2222/*
    2323Plugin Name: pwgCumulus
    24 Version: 0.4.2
     24Version: 0.4.3
    2525Description: add an amazing tag cloud
    2626Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=263
  • extensions/pwgCumulus/template/admin.tpl

    r5405 r6379  
    1010  .each(function() {
    1111      if ($(this).val() !== undefined) {
    12         $(this).css('background-color', '#'+$(this).val());
     12        if ($(this).val().indexOf('#',0)==-1) {
     13           $(this).css('background-color', '#'+$(this).val());
     14        } else {
     15           $(this).css('background-color', $(this).val());
     16        }
    1317      }
    1418    })
Note: See TracChangeset for help on using the changeset viewer.