Plugin Directory

Changeset 1324467


Ignore:
Timestamp:
01/09/2016 07:40:45 AM (10 years ago)
Author:
grace-create
Message:

Ver 1.1

Location:
rating-writing/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • rating-writing/trunk/classes/meta-boxes.class.php

    r1318404 r1324467  
    4040      $checked = array( $checked_01, $checked_02, $checked_03, $checked_04, $checked_05 );
    4141      $this -> _key = array( '_key_01', '_key_02', '_key_03', '_key_04', '_key_05' );
    42       $image_url = '<img src="' . GCRW_PLUGIN_URL . '/images/' . esc_html( $this -> _img_file ) . '" />';
     42      $item_num = '1';
     43      $stars_num = 'a';
    4344      $i = 0;
    4445      foreach( $checked as $checked_num ) {
     
    5556        }
    5657        echo '<li>' . "\n";
    57         echo '<h4>' . __( 'rating item', 'gcrw' ) . '&nbsp;<input id="' . esc_attr( ++$this -> _text_id ) . '" class="' . esc_attr( $this -> _text_id ) . '" name="' . esc_attr( ++$this -> _text_key ) . '" type="text" value="' . esc_attr( $text[$num][0] ) . '" /></h4>' . "\n";
     58        echo '<h4>' . __( 'rating item', 'gcrw' ) . $item_num++ . ' <input id="' . esc_attr( ++$this -> _text_id ) . '" class="' . esc_attr( $this -> _text_id ) . '" name="' . esc_attr( ++$this -> _text_key ) . '" type="text" value="' . esc_attr( $text[$num][0] ) . '" /></h4>' . "\n";
     59        echo '<fieldset class="rating clearfix">' . "\n";
    5860        foreach( $this -> _key as $key_num ) {
    59           echo '<input id="' . esc_attr( ++$this -> _id ) . '" name="' . esc_attr( $this -> _key[$num] ) . '" type="radio" value="' . esc_attr( ++$this -> _stars ) . '"';
     61          echo '<input id="' . esc_attr( ++$this -> _id ) . '" class="stars" name="' . esc_attr( $this -> _key[$num] ) . '" type="radio" value="' . esc_attr( ++$this -> _stars ) . '"';
    6062          if( $checked[$num][0] === $this -> _stars ) echo ' checked = "checked"';
    61           echo ' />' . "\n" . '<label class="' . esc_attr( $this -> _rating++ ) . '" for="' . esc_attr( $this -> _id ) . '">' . $image_url . '</label><br />' . "\n";
     63          echo ' />' . "\n" . '<label class="' . esc_attr( $this -> _rating++ ) . ' stars" for="' . esc_attr( $this -> _id ) . '">stars-' . $stars_num++ . '</label>' . "\n";
    6264        }
    63         echo '<input id="' . esc_attr( ++$this -> _clear_id ) . '" class="' . esc_attr( $clear_id ) . '" name="' . esc_attr( $this -> _key[$num] ) . '" type="radio" value="" />' . "\n";
    64         echo '<label class="clear-button" for="' . esc_attr( $clear_id ) . '">clear</label>' . "\n";
     65        echo '</fieldset>' . "\n";
     66        echo '<fieldset class="clear">' . "\n";
     67        echo '<input id="' . esc_attr( ++$this -> _clear_id ) . '" class="' . esc_attr( $this -> _clear_id ) . '" name="' . esc_attr( $this -> _key[$num] ) . '" type="radio" value="" />' . "\n";
     68        echo '<label class="clear-button" for="' . esc_attr( $this -> _clear_id ) . '">clear</label>' . "\n";
     69        echo '</fieldset>' . "\n";
    6570        echo '</li>' . "\n";
    6671        $i++;
  • rating-writing/trunk/css/gcrw-admin.css

    r1318404 r1324467  
    44}
    55
    6 #rating-writing #inner-meta label {
    7   width: 120px;
    8   height: 24px;
    9   overflow: hidden;
    10   display: inline-block;
     6#rating-writing #inner-meta li fieldset.rating {
     7  margin: 0 0 8px;
     8  float: left;
    119}
    1210
    13 #rating-writing label.rating_01 img,
    14 #rating-writing label.rating_06 img,
    15 #rating-writing label.rating_11 img,
    16 #rating-writing label.rating_16 img,
    17 #rating-writing label.rating_21 img {
    18   margin: 0;
     11#rating-writing #inner-meta li fieldset.clear {
     12  margin: 0 0 64px 4px;
    1913}
    2014
    21 #rating-writing label.rating_02 img,
    22 #rating-writing label.rating_07 img,
    23 #rating-writing label.rating_12 img,
    24 #rating-writing label.rating_17 img,
    25 #rating-writing label.rating_22 img {
    26   margin: -24px 0 0;
     15#rating-writing #inner-meta li fieldset.rating:not(:checked) > input {
     16  position: absolute;
     17  left: -9999px;
     18  clip: rect(0,0,0,0);
    2719}
    2820
    29 #rating-writing label.rating_03 img,
    30 #rating-writing label.rating_08 img,
    31 #rating-writing label.rating_13 img,
    32 #rating-writing label.rating_18 img,
    33 #rating-writing label.rating_23 img {
    34   margin: -48px 0 0;
     21#rating-writing #inner-meta li fieldset.rating:not(:checked) > label {
     22  font-family: FontAwesome;
     23  float: right;
     24  width: 25px;
     25  overflow: hidden;
     26  white-space: nowrap;
     27  cursor: pointer;
     28  font-size: 200%;
     29  line-height: 1.2;
     30  color: #efefef;
    3531}
    3632
    37 #rating-writing label.rating_04 img,
    38 #rating-writing label.rating_09 img,
    39 #rating-writing label.rating_14 img,
    40 #rating-writing label.rating_19 img,
    41 #rating-writing label.rating_24 img {
    42   margin: -72px 0 0;
     33#rating-writing #inner-meta li fieldset.rating:not(:checked) > label:before {
     34  content: "\f005";
    4335}
    4436
    45 #rating-writing label.rating_05 img,
    46 #rating-writing label.rating_10 img,
    47 #rating-writing label.rating_15 img,
    48 #rating-writing label.rating_20 img,
    49 #rating-writing label.rating_25 img {
    50   margin: -96px 0 0;
     37input[type=radio]:checked+label:before {
     38  color: #ffa400;
    5139}
     40
     41#rating-writing #inner-meta li fieldset.rating > input:checked ~ label {
     42  color: #ffa400;
     43}
     44
     45#rating-writing #inner-meta li fieldset.rating:not(:checked) > label:hover,
     46#rating-writing #inner-meta li fieldset.rating:not(:checked) > label:hover ~ label {
     47  color: #ffa400;
     48  webkit-transition: color 0.2s linear;
     49  -moz-transition: color 0.2s linear;
     50  -o-transition: color 0.2s linear;
     51  transition: color 0.2s linear;
     52}
     53
     54#rating-writing #inner-meta li fieldset.rating > input:checked + label:hover,
     55#rating-writing #inner-meta li fieldset.rating > input:checked + label:hover ~ label,
     56#rating-writing #inner-meta li fieldset.rating > input:checked ~ label:hover,
     57#rating-writing #inner-meta li fieldset.rating > input:checked ~ label:hover ~ label,
     58#rating-writing #inner-meta li fieldset.rating > label:hover ~ input:checked ~ label {
     59  color: #ffa400;
     60  webkit-transition: color 0.2s linear;
     61  -moz-transition: color 0.2s linear;
     62  -o-transition: color 0.2s linear;
     63  transition: color 0.2s linear;
     64}
     65
     66#rating-writing #inner-meta li fieldset.rating > label:active {
     67  color: #ffa400;
     68  position: relative;
     69  top: 1px;
     70  left: 1px;
     71}
  • rating-writing/trunk/css/gcrw.css

    r1318404 r1324467  
    3838aside.rating-writing table.rating-table img.stars_16,
    3939aside.rating-writing table.rating-table img.stars_21 {
    40   margin: 0;
     40  margin: -96px 0 0;
    4141}
    4242
     
    4646aside.rating-writing table.rating-table img.stars_17,
    4747aside.rating-writing table.rating-table img.stars_22 {
    48   margin: -24px 0 0;
     48  margin: -72px 0 0;
    4949}
    5050
     
    6262aside.rating-writing table.rating-table img.stars_19,
    6363aside.rating-writing table.rating-table img.stars_24 {
    64   margin: -72px 0 0;
     64  margin: -24px 0 0;
    6565}
    6666
     
    7070aside.rating-writing table.rating-table img.stars_20,
    7171aside.rating-writing table.rating-table img.stars_25 {
    72   margin: -96px 0 0;
     72  margin: 0;
    7373}
  • rating-writing/trunk/includes/controller.php

    r1318404 r1324467  
    44function gcrw_admin_enqueue_styles() {
    55  wp_enqueue_style( 'gcrw-admin-styles', GCRW_PLUGIN_URL . '/css/gcrw-admin.css', '', GCRW_VERSION, 'all' );
     6  wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', '', GCRW_VERSION, 'all' );
    67}
    78add_action( 'admin_enqueue_scripts', 'gcrw_admin_enqueue_styles' );
  • rating-writing/trunk/includes/meta-boxes.php

    r1318404 r1324467  
    1414  echo '&nbsp;<input id="title-text" class="title-text" name="_t_t_key" size="40" type="text" value="' . esc_attr( $title_text[0] ) . '" />';
    1515  echo '</h3>' . "\n";
    16   echo '<ul id="inner-meta" class="clearfix">' . "\n";
     16  echo '<ul id="inner-meta">' . "\n";
    1717  echo $box -> getBox();
    1818  echo '</ul>' . "\n";
  • rating-writing/trunk/rating-writing.php

    r1318404 r1324467  
    44Plugin URI:
    55Description: Plugin for write in your own rating star into a WordPress blog.
    6 Version: 1.0
     6Version: 1.1
    77Author: Tatsuhiro Sakata
    88Author URI: http://grace-create.com/
  • rating-writing/trunk/readme.txt

    r1318404 r1324467  
    55Requires at least: 4.4
    66Tested up to: 4.4
    7 Stable tag: 1.0
     7Stable tag: 1.1
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3232
    3333== Changelog ==
     3409 Jan 2016
     35-----------
     36= V1.1 =
     37* Change the style of the admin page.
    3438
    35 1.0
    36 Initial working version.
     39= V1.0 =
     4027 Dec 2015
     41-----------
     42* Initial working version.
    3743
    3844== Upgrade notice ==
Note: See TracChangeset for help on using the changeset viewer.