Changeset 86250 in spip-zone


Ignore:
Timestamp:
Nov 22, 2014, 9:26:44 PM (5 years ago)
Author:
cedric@…
Message:

sprite magnet

Location:
_plugins_/magnet
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/magnet/magnet_fonctions.php

    r86249 r86250  
    143143        if (!$done){
    144144                $done = true;
    145                 $img_on = _DIR_PLUGIN_MAGNET . "magnet-gray-32.png";
    146                 $img_set = _DIR_PLUGIN_MAGNET . "magnet-32.png";
    147                 $img_off = _DIR_PLUGIN_MAGNET . "magnet-off-gray-32.png";
    148                 $img_remove = _DIR_PLUGIN_MAGNET . "magnet-off-32.png";
     145                $img_on = _DIR_PLUGIN_MAGNET . "spt-magnets.png";
    149146                $styles = <<<css
    150147<style>
     
    153150.admin-magnet button {min-height:32px;position: relative;}
    154151.admin-magnet.magnet button i {display:inline-block;width:32px;}
    155 .admin-magnet.magnet button i:after {content:"";;display:block;position:absolute;left:0;top:50%;margin-top:-16px;width:32px;height:32px;background:url($img_on) no-repeat left center;}
     152.admin-magnet.magnet button i:after {content:"";;display:block;position:absolute;left:0;top:50%;margin-top:-16px;width:32px;height:32px;background:url($img_on) no-repeat left -64px;}
    156153.admin-magnet.magnet-up,.spip-admin-boutons.magnet-down {padding-left: 0;padding-right: 0;}
    157154.admin-magnet.magnet.magnetized button {}
    158 .admin-magnet.magnet.magnetized:hover button i:after {background-image:url($img_remove);}
    159 .admin-magnet.magnet.demagnetized button i:after {background-image:url($img_off);}
    160 .admin-magnet.magnet.demagnetized:hover button i:after {background-image:url($img_set);}
     155.admin-magnet.magnet.magnetized:hover button i:after {background-position:left -32px;}
     156.admin-magnet.magnet.demagnetized button i:after {background-position:left -96px;}
     157.admin-magnet.magnet.demagnetized:hover button i:after {background-position:left 0;}
    161158.admin-magnet.magnet span {visibility: hidden;}
    162159.admin-magnet.magnet:hover span {visibility: visible;}
Note: See TracChangeset for help on using the changeset viewer.