Plugin Directory

Changeset 3191429


Ignore:
Timestamp:
11/18/2024 03:46:32 PM (15 months ago)
Author:
dragwp
Message:

Update to version 1.1.9 from GitHub

Location:
flex-guten
Files:
108 added
8 deleted
27 edited
1 copied

Legend:

Unmodified
Added
Removed
  • flex-guten/assets/banner-772x250.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • flex-guten/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • flex-guten/assets/screenshot-1.jpg

    • Property svn:mime-type changed from application/octet-stream to image/jpeg
  • flex-guten/assets/screenshot-2.jpg

    • Property svn:mime-type changed from application/octet-stream to image/jpeg
  • flex-guten/assets/screenshot-3.jpg

    • Property svn:mime-type changed from application/octet-stream to image/jpeg
  • flex-guten/tags/1.1.9/includes/Blocks/BlockRegister/BlockRegister.php

    r2885572 r3191429  
    11<?php
    22namespace Dwp\Blocks\BlockRegister;
    3 use Dwp;
     3
     4// Added namespaces necessary for the files.
     5use Dwp\Assets;
     6use Dwp\Blocks\BlockStyle\PostGridOne\PostGridOne;
     7use Dwp\Blocks\BlockStyle\Pinterest\PinterestStyleOne;
     8use Dwp\Blocks\BlockStyle\Amazon\AmazonReviewOne;
    49
    510class BlockRegister
    611{
    7     public $asset;   
     12    public $asset;
    813
    9     function __construct(){
    10         add_action( 'init', [ $this, 'flexguten_blocks_init' ] );
    11         $this->asset = new Dwp\Assets();
     14    public function __construct()
     15    {
     16        add_action('init', [$this, 'flexguten_blocks_init']);
     17        $this->asset = new Assets(); // Ensure the Assets class is correctly autoloaded
    1218    }
    1319
    1420    /**
    1521     * Blocks Register
    16     */
    17     public function flexguten_register_block( $name, $options = array() ) {
    18         register_block_type( FLEXGUTEN_PATH . '/build/blocks/' . $name, $options );
     22     */
     23    public function flexguten_register_block($name, $options = array())
     24    {
     25        register_block_type(FLEXGUTEN_PATH . '/build/blocks/' . $name, $options);
    1926    }
    2027
    2128    /**
    2229     * Blocks Initialization
    23     */
    24     public function flexguten_blocks_init() {       
    25        
    26         /**
    27          * Register Pinterest Block
    28         */
    29         $this->flexguten_register_block( 'pinterest-style-one',[
    30             'render_callback' => [$this,'pinterest_style_one_render_callback']
    31         ]  );       
    32        
    33         /**
    34          * Register Amazon Review Block
    35         */
    36         $this->flexguten_register_block( 'amazon-review-one',[
    37             'render_callback' => [$this,'amazon_review_one_render_callback']
    38         ]  );     
    39        
    40         /**
    41          * Register Post Grid Block
    42         */
    43         $this->flexguten_register_block( 'post-grid-one',[
    44             'render_callback' => [$this,'post_grid_block_render_callback']
    45         ]  );
    46        
     30     */
     31    public function flexguten_blocks_init()
     32    {
     33        // Register Pinterest Block
     34        $this->flexguten_register_block('pinterest-style-one', [
     35            'render_callback' => [$this, 'pinterest_style_one_render_callback']
     36        ]);
     37
     38        // Register Amazon Review Block
     39        $this->flexguten_register_block('amazon-review-one', [
     40            'render_callback' => [$this, 'amazon_review_one_render_callback']
     41        ]);
     42
     43        // Register Post Grid Block
     44        $this->flexguten_register_block('post-grid-one', [
     45            'render_callback' => [$this, 'post_grid_block_render_callback']
     46        ]);
    4747    }
    4848
    4949    /**
    5050     * Pinterest Style One Callback
    51     */
    52     public function pinterest_style_one_render_callback($attr, $output){
     51     */
     52    public function pinterest_style_one_render_callback($attr, $output)
     53    {
     54        $PinterestBlock = new PinterestStyleOne();
     55        $id = $attr['id'] ?? ''; // Sanitize and validate attribute
    5356
    54         $PinterestBlock = new Dwp\Blocks\BlockStyle\Pinterest\PinterestStyleOne();
    55         $id = $attr['id'];
    56 
    57         /**
    58          * Pinterest Style One Editor Style
    59         */
     57        // Pinterest Style One Editor Style
    6058        $this->asset->flexguten_inline_style(
    6159            $id,
    62             $PinterestBlock->flexguten_frontend_styles($attr, $id )
     60            $PinterestBlock->flexguten_frontend_styles($attr, $id)
    6361        );
    64        
    65         /**
    66          * Pinterest Style One Frontend
    67         */
    68         return $PinterestBlock->flexguten_frontend_render( $attr, $id );
    6962
     63        // Pinterest Style One Frontend
     64        return $PinterestBlock->flexguten_frontend_render($attr, $id);
    7065    }
    7166
    7267    /**
    7368     * Amazon Review One Callback
    74     */
    75     public function amazon_review_one_render_callback($attr, $output){
     69     */
     70    public function amazon_review_one_render_callback($attr, $output)
     71    {
     72        $AmazonReviewOne = new AmazonReviewOne();
     73        $id = $attr['id'] ?? ''; // Sanitize and validate attribute
    7674
    77         $AmazonReviewOne = new Dwp\Blocks\BlockStyle\Amazon\AmazonReviewOne();
    78         $id = $attr['id'];
    79 
    80         /**
    81          * Amazon Style One Editor Style
    82         */
     75        // Amazon Style One Editor Style
    8376        $this->asset->flexguten_inline_style(
    8477            $id,
    85             $AmazonReviewOne->flexguten_frontend_styles($attr, $id )
     78            $AmazonReviewOne->flexguten_frontend_styles($attr, $id)
    8679        );
    87        
    88         /**
    89          * Amazon Style One Frontend
    90         */
    91         //return $AmazonReviewOne->flexguten_frontend_render( $attr, $id );
    9280
    93         return $output;
    94 
     81        // Amazon Style One Frontend
     82        return $AmazonReviewOne->flexguten_frontend_render($attr, $id);
    9583    }
    9684
    9785    /**
    9886     * Post Grid One Render Callback
    99     */
    100     public function post_grid_block_render_callback($attr, $output){
     87     */
     88    public function post_grid_block_render_callback($attr, $output)
     89    {
     90        $PostGridOne = new PostGridOne();
     91        $id = $attr['id'] ?? ''; // Sanitize and validate attribute
    10192
    102         $PostGridOne = new Dwp\Blocks\BlockStyle\PostGridOne\PostGridOne();
    103         $id = $attr['id'];
     93        // Post Grid One Editor Style
     94        $this->asset->flexguten_inline_style(
     95            $id,
     96            $PostGridOne->flexguten_frontend_styles($attr, $id)
     97        );
    10498
    105         /**
    106          * Post Grid One Editor Style
    107         */
    108         $this->asset->flexguten_inline_style(           
    109             $id,
    110             $PostGridOne->flexguten_frontend_styles($attr, $id )
    111         );
    112        
    113         /**
    114          * Post Grid One Frontend
    115         */
    116         return $PostGridOne->flexguten_frontend_render( $attr, $id );
    117 
    118         return $output;
    119 
     99        // Post Grid One Frontend
     100        return $PostGridOne->flexguten_frontend_render($attr, $id);
    120101    }
    121 
    122102}
  • flex-guten/tags/1.1.9/includes/Blocks/BlockStyle/Amazon/AmazonReviewOne.php

    r2879752 r3191429  
    8585
    8686}
     87
  • flex-guten/tags/1.1.9/includes/assets/css/main.css

    r2878306 r3191429  
     1<<<<<<< HEAD
    12/* body {
    23    background: green !important;
     
    56    color: green;
    67} */
     8=======
     9/* body {
     10    background: green !important;
     11}
     12h1 {
     13    color: green;
     14} */
     15>>>>>>> origin/main
  • flex-guten/tags/1.1.9/includes/assets/fonts/merriweather.css

    r2878306 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: merriweather;
     
    5556        url(./merriweather/Merriweather-HeavyItalic.woff) format("woff");
    5657}
     58=======
     59@font-face {
     60    font-family: merriweather;
     61    font-style: italic;
     62    font-weight: 400;
     63    src: local("Merriweather"),
     64        url(./merriweather/Merriweather-Italic.woff) format("woff");
     65}
     66@font-face {
     67    font-family: merriweather;
     68    font-style: normal;
     69    font-weight: 250;
     70    src: local("Merriweather"),
     71        url(./merriweather/Merriweather-Regular.woff) format("woff");
     72}
     73@font-face {
     74    font-family: merriweather;
     75    font-style: normal;
     76    font-weight: 250;
     77    src: local("Merriweather"),
     78        url(./merriweather/Merriweather-Light.woff) format("woff");
     79}
     80@font-face {
     81    font-family: merriweather;
     82    font-style: italic;
     83    font-weight: 300;
     84    src: local("Merriweather"),
     85        url(./merriweather/Merriweather-LightItalic.woff) format("woff");
     86}
     87@font-face {
     88    font-family: merriweather;
     89    font-style: normal;
     90    font-weight: 700;
     91    src: local("Merriweather"),
     92        url(./merriweather/Merriweather-Bold.woff) format("woff");
     93}
     94@font-face {
     95    font-family: merriweather;
     96    font-style: italic;
     97    font-weight: 700;
     98    src: local("Merriweather"),
     99        url(./merriweather/Merriweather-BoldItalic.woff) format("woff");
     100}
     101@font-face {
     102    font-family: merriweather;
     103    font-style: normal;
     104    font-weight: 900;
     105    src: local("Merriweather"),
     106        url(./merriweather/Merriweather-Black.woff) format("woff");
     107}
     108@font-face {
     109    font-family: merriweather;
     110    font-style: italic;
     111    font-weight: 900;
     112    src: local("Merriweather"),
     113        url(./merriweather/Merriweather-HeavyItalic.woff) format("woff");
     114}
     115>>>>>>> origin/main
  • flex-guten/tags/1.1.9/includes/assets/fonts/nunito.css

    r2879752 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: "Nunito";
     
    6162    src: local("Nunito"), url("./nunito/Nunito-BlackItalic.woff") format("woff");
    6263}
     64=======
     65@font-face {
     66    font-family: "Nunito";
     67    font-style: normal;
     68    font-weight: 400;
     69    src: local("Nunito"), url("./nunito/Nunito-Regular.woff") format("woff");
     70}
     71@font-face {
     72    font-family: "Nunito";
     73    font-style: italic;
     74    font-weight: 400;
     75    src: local("Nunito"), url("./nunito/Nunito-Italic.woff") format("woff");
     76}
     77@font-face {
     78    font-family: "Nunito";
     79    font-style: normal;
     80    font-weight: 600;
     81    src: local("Nunito"), url("./nunito/Nunito-SemiBold.woff") format("woff");
     82}
     83@font-face {
     84    font-family: "Nunito";
     85    font-style: italic;
     86    font-weight: 600;
     87    src: local("Nunito"),
     88        url("./nunito/Nunito-SemiBoldItalic.woff") format("woff");
     89}
     90@font-face {
     91    font-family: "Nunito";
     92    font-style: normal;
     93    font-weight: 700;
     94    src: local("Nunito"), url("./nunito/Nunito-Bold.woff") format("woff");
     95}
     96@font-face {
     97    font-family: "Nunito";
     98    font-style: italic;
     99    font-weight: 700;
     100    src: local("Nunito"), url("./nunito/Nunito-BoldItalic.woff") format("woff");
     101}
     102@font-face {
     103    font-family: "Nunito";
     104    font-style: normal;
     105    font-weight: 800;
     106    src: local("Nunito"), url("./nunito/Nunito-ExtraBold.woff") format("woff");
     107}
     108@font-face {
     109    font-family: "Nunito";
     110    font-style: italic;
     111    font-weight: 800;
     112    src: local("Nunito"),
     113        url("./nunito/Nunito-ExtraBoldItalic.woff") format("woff");
     114}
     115@font-face {
     116    font-family: "Nunito";
     117    font-style: normal;
     118    font-weight: 900;
     119    src: local("Nunito"), url("./nunito/Nunito-Black.woff") format("woff");
     120}
     121@font-face {
     122    font-family: "Nunito";
     123    font-style: italic;
     124    font-weight: 900;
     125    src: local("Nunito"), url("./nunito/Nunito-BlackItalic.woff") format("woff");
     126}
     127>>>>>>> origin/main
  • flex-guten/tags/1.1.9/includes/assets/fonts/proxima-nova-2.css

    r2878306 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: proxima nova;
     
    9596        url("./proxima-nova-2/Black.woff") format("woff");
    9697}
     98=======
     99@font-face {
     100    font-family: proxima nova;
     101    font-style: normal;
     102    font-weight: 400;
     103    src: local("Proxima Nova"),
     104        url("./proxima-nova-2/Regular-Italic.woff") format("woff");
     105}
     106@font-face {
     107    font-family: proxima nova;
     108    font-style: normal;
     109    font-weight: 400;
     110    src: local("Proxima Nova"),
     111        url("./proxima-nova-2/Regular.woff") format("woff");
     112}
     113@font-face {
     114    font-family: proxima nova;
     115    font-style: normal;
     116    font-weight: 250;
     117    src: local("Proxima Nova"),
     118        url("./proxima-nova-2/Thin-Italic.woff") format("woff");
     119}
     120@font-face {
     121    font-family: proxima nova;
     122    font-style: normal;
     123    font-weight: 250;
     124    src: local("Proxima Nova"), url("./proxima-nova-2/Thin.woff") format("woff");
     125}
     126@font-face {
     127    font-family: proxima nova;
     128    font-style: normal;
     129    font-weight: 300;
     130    src: local("Proxima Nova"),
     131        url("./proxima-nova-2/Light.woff") format("woff");
     132}
     133@font-face {
     134    font-family: proxima nova;
     135    font-style: italic;
     136    font-weight: 300;
     137    src: local("Proxima Nova"),
     138        url("./proxima-nova-2/Light-Italic.woff") format("woff");
     139}
     140@font-face {
     141    font-family: proxima nova;
     142    font-style: normal;
     143    font-weight: 600;
     144    src: local("Proxima Nova"),
     145        url("./proxima-nova-2/Semibold-Italic.woff") format("woff");
     146}
     147@font-face {
     148    font-family: proxima nova;
     149    font-style: normal;
     150    font-weight: 600;
     151    src: local("Proxima Nova"),
     152        url("./proxima-nova-2/Semibold.woff") format("woff");
     153}
     154@font-face {
     155    font-family: proxima nova;
     156    font-style: normal;
     157    font-weight: 700;
     158    src: local("Proxima Nova"),
     159        url("./proxima-nova-2/Bold-Italic.woff") format("woff");
     160}
     161@font-face {
     162    font-family: proxima nova;
     163    font-style: normal;
     164    font-weight: 700;
     165    src: local("Proxima Nova"), url("./proxima-nova-2/Bold.woff") format("woff");
     166}
     167@font-face {
     168    font-family: proxima nova;
     169    font-style: normal;
     170    font-weight: 800;
     171    src: local("Proxima Nova"),
     172        url("./proxima-nova-2/Extrabold-Italic.woff") format("woff");
     173}
     174@font-face {
     175    font-family: proxima nova;
     176    font-style: normal;
     177    font-weight: 800;
     178    src: local("Proxima Nova"),
     179        url("./proxima-nova-2/Extrabold.woff") format("woff");
     180}
     181@font-face {
     182    font-family: proxima nova;
     183    font-style: normal;
     184    font-weight: 900;
     185    src: local("Proxima Nova"),
     186        url("./proxima-nova-2/Black-Italic.woff") format("woff");
     187}
     188@font-face {
     189    font-family: proxima nova;
     190    font-style: normal;
     191    font-weight: 900;
     192    src: local("Proxima Nova"),
     193        url("./proxima-nova-2/Black.woff") format("woff");
     194}
     195>>>>>>> origin/main
  • flex-guten/tags/1.1.9/includes/assets/fonts/sharp-sans.css

    r2879752 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: "Sharp Sans";
     
    8990    src: local("Sharp Sans"), url("./sharp-sans/Extrabold.woff") format("woff");
    9091}
     92=======
     93@font-face {
     94    font-family: "Sharp Sans";
     95    font-style: normal;
     96    font-weight: 400;
     97    src: local("Sharp Sans"), url("./sharp-sans/Italic.woff") format("woff");
     98}
     99@font-face {
     100    font-family: "Sharp Sans";
     101    font-style: normal;
     102    font-weight: 400;
     103    src: local("Sharp Sans"), url("./sharp-sans/Sharp-Sans.woff") format("woff");
     104}
     105@font-face {
     106    font-family: "Sharp Sans";
     107    font-style: normal;
     108    font-weight: 280;
     109    src: local("Sharp Sans"),
     110        url("./sharp-sans/Thin-Italic.woff") format("woff");
     111}
     112@font-face {
     113    font-family: "Sharp Sans";
     114    font-style: normal;
     115    font-weight: 280;
     116    src: local("Sharp Sans"), url("./sharp-sans/Thin.woff") format("woff");
     117}
     118@font-face {
     119    font-family: "Sharp Sans";
     120    font-style: normal;
     121    font-weight: 300;
     122    src: local("Sharp Sans"),
     123        url("./sharp-sans/Light-Italic.woff") format("woff");
     124}
     125@font-face {
     126    font-family: "Sharp Sans";
     127    font-style: normal;
     128    font-weight: 300;
     129    src: local("Sharp Sans"), url("./sharp-sans/Light.woff") format("woff");
     130}
     131@font-face {
     132    font-family: "Sharp Sans";
     133    font-style: normal;
     134    font-weight: 500;
     135    src: local("Sharp Sans"),
     136        url("./sharp-sans/Medium-Italic.woff") format("woff");
     137}
     138@font-face {
     139    font-family: "Sharp Sans";
     140    font-style: normal;
     141    font-weight: 500;
     142    src: local("Sharp Sans"), url("./sharp-sans/Medium.woff") format("woff");
     143}
     144@font-face {
     145    font-family: "Sharp Sans";
     146    font-style: normal;
     147    font-weight: 600;
     148    src: local("Sharp Sans"),
     149        url("./sharp-sans/Semibold-Italic.woff") format("woff");
     150}
     151@font-face {
     152    font-family: "Sharp Sans";
     153    font-style: normal;
     154    font-weight: 600;
     155    src: local("Sharp Sans"), url("./sharp-sans/Semibold.woff") format("woff");
     156}
     157@font-face {
     158    font-family: "Sharp Sans";
     159    font-style: normal;
     160    font-weight: 700;
     161    src: local("Sharp Sans"),
     162        url("./sharp-sans/Bold-Italic.woff") format("woff");
     163}
     164@font-face {
     165    font-family: "Sharp Sans";
     166    font-style: normal;
     167    font-weight: 700;
     168    src: local("Sharp Sans"), url("./sharp-sans/Bold.woff") format("woff");
     169}
     170@font-face {
     171    font-family: "Sharp Sans";
     172    font-style: normal;
     173    font-weight: 800;
     174    src: local("Sharp Sans"),
     175        url("./sharp-sans/ExtraBold-Italic.woff") format("woff");
     176}
     177@font-face {
     178    font-family: "Sharp Sans";
     179    font-style: normal;
     180    font-weight: 800;
     181    src: local("Sharp Sans"), url("./sharp-sans/Extrabold.woff") format("woff");
     182}
     183>>>>>>> origin/main
  • flex-guten/tags/1.1.9/includes/assets/js/plugin.js

    r2878306 r3191429  
     1<<<<<<< HEAD
    12(function ($) {
    23    $('.rating').rate({ readonly: true });
    34})(jQuery);
     5=======
     6(function ($) {
     7    $('.rating').rate({ readonly: true });
     8})(jQuery);
     9>>>>>>> origin/main
  • flex-guten/tags/1.1.9/includes/assets/js/rater.min.js

    r2879752 r3191429  
     1<<<<<<< HEAD
    12(function($,window){$.fn.textWidth=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var width=html_calc.width();html_calc.remove();if(width==0){var total=0;$(this).eq(0).children().each(function(){total+=$(this).textWidth()});return total}return width};$.fn.textHeight=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var height=html_calc.height();html_calc.remove();return height};Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"};String.prototype.getCodePointLength=function(){return this.length-this.split(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g).length+1};String.fromCodePoint=function(){var chars=Array.prototype.slice.call(arguments);for(var i=chars.length;i-->0;){var n=chars[i]-65536;if(n>=0)chars.splice(i,1,55296+(n>>10),56320+(n&1023))}return String.fromCharCode.apply(null,chars)};$.fn.rate=function(options){if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"rate")){$.data(this,"rate",new Rate(this,options))}})}else if(typeof options==="string"){var args=arguments;var returns;this.each(function(){var instance=$.data(this,"rate");if(instance instanceof Rate&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$(instance.element).off();$.data(this,"rate",null)}});return returns!==undefined?returns:this}};function Rate(element,options){this.element=element;this.settings=$.extend({},$.fn.rate.settings,options);this.set_faces={};this.build()}Rate.prototype.build=function(){this.layers={};this.value=0;this.raise_select_layer=false;if(this.settings.initial_value){this.value=this.settings.initial_value}if($(this.element).attr("data-rate-value")){this.value=$(this.element).attr("data-rate-value")}var selected_width=this.value/this.settings.max_value*100;if(typeof this.settings.symbols[this.settings.selected_symbol_type]==="string"){var symbol=this.settings.symbols[this.settings.selected_symbol_type];this.settings.symbols[this.settings.selected_symbol_type]={};this.settings.symbols[this.settings.selected_symbol_type]["base"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["selected"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["hover"]=symbol}var base_layer=this.addLayer("base-layer",100,this.settings.symbols[this.settings.selected_symbol_type]["base"],true);var select_layer=this.addLayer("select-layer",selected_width,this.settings.symbols[this.settings.selected_symbol_type]["selected"],true);var hover_layer=this.addLayer("hover-layer",0,this.settings.symbols[this.settings.selected_symbol_type]["hover"],false);this.layers["base_layer"]=base_layer;this.layers["select_layer"]=select_layer;this.layers["hover_layer"]=hover_layer;$(this.element).on("mousemove",$.proxy(this.hover,this));$(this.element).on("click",$.proxy(this.select,this));$(this.element).on("mouseleave",$.proxy(this.mouseout,this));$(this.element).css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}};Rate.prototype.addLayer=function(layer_name,visible_width,symbol,visible){var layer_body="<div>";for(var i=0;i<this.settings.max_value;i++){if(Array.isArray(symbol)){if(this.settings.convert_to_utf8){symbol[i]=String.fromCodePoint(symbol[i])}layer_body+="<span>"+symbol[i]+"</span>"}else{if(this.settings.convert_to_utf8){symbol=String.fromCodePoint(symbol)}layer_body+="<span>"+symbol+"</span>"}}layer_body+="</div>";var layer=$(layer_body).addClass("rate-"+layer_name).appendTo(this.element);$(layer).css({width:visible_width+"%",height:$(layer).children().eq(0).textHeight(),overflow:"hidden",position:"absolute",top:0,display:visible?"block":"none","white-space":"nowrap"});$(this.element).css({width:$(layer).textWidth()+"px",height:$(layer).height(),position:"relative",cursor:this.settings.cursor});return layer};Rate.prototype.updateServer=function(){if(this.settings.url!=undefined){$.ajax({url:this.settings.url,type:this.settings.ajax_method,data:$.extend({},{value:this.getValue()},this.settings.additional_data),success:$.proxy(function(data){$(this.element).trigger("updateSuccess",[data])},this),error:$.proxy(function(jxhr,msg,err){$(this.element).trigger("updateError",[jxhr,msg,err])},this)})}};Rate.prototype.getValue=function(){return this.value};Rate.prototype.hover=function(ev){var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var val=this.toValue(x,true);if(val!=this.value){this.raise_select_layer=false}if(!this.raise_select_layer&&!this.settings.readonly){var visible_width=this.toWidth(val);this.layers.select_layer.css({display:"none"});if(!this.settings.only_select_one_symbol){this.layers.hover_layer.css({width:visible_width+"%",display:"block"})}else{var index_value=Math.floor(val);this.layers.hover_layer.css({width:"100%",display:"block"});this.layers.hover_layer.children("span").css({visibility:"hidden"});this.layers.hover_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}}};Rate.prototype.select=function(ev){if(!this.settings.readonly){var old_value=this.getValue();var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var selected_width=this.toWidth(this.toValue(x,true));this.setValue(this.toValue(selected_width));this.raise_select_layer=true}};Rate.prototype.mouseout=function(){this.layers.hover_layer.css({display:"none"});this.layers.select_layer.css({display:"block"})};Rate.prototype.toWidth=function(val){return val/this.settings.max_value*100};Rate.prototype.toValue=function(width,in_pixels){var val;if(in_pixels){val=width/this.layers.base_layer.textWidth()*this.settings.max_value}else{val=width/100*this.settings.max_value}var temp=val/this.settings.step_size;if(temp-Math.floor(temp)<5e-5){val=Math.round(val/this.settings.step_size)*this.settings.step_size}val=Math.ceil(val/this.settings.step_size)*this.settings.step_size;val=val>this.settings.max_value?this.settings.max_value:val;return val};Rate.prototype.getElement=function(layer_name,index){return $(this.element).find(".rate-"+layer_name+" span").eq(index-1)};Rate.prototype.getLayers=function(){return this.layers};Rate.prototype.setFace=function(value,face){this.set_faces[value]=face};Rate.prototype.setAdditionalData=function(data){this.settings.additional_data=data};Rate.prototype.getAdditionalData=function(){return this.settings.additional_data};Rate.prototype.removeFace=function(value){delete this.set_faces[value]};Rate.prototype.setValue=function(value){if(!this.settings.readonly){if(value<0){value=0}else if(value>this.settings.max_value){value=this.settings.max_value}var old_value=this.getValue();this.value=value;var change_event=$(this.element).trigger("change",{from:old_value,to:this.value});$(this.element).find(".rate-face").remove();$(this.element).find("span").css({visibility:"visible"});var index_value=Math.ceil(this.value);if(this.set_faces.hasOwnProperty(index_value)){var face="<div>"+this.set_faces[index_value]+"</div>";var base_layer_element=this.getElement("base-layer",index_value);var select_layer_element=this.getElement("select-layer",index_value);var hover_layer_element=this.getElement("hover-layer",index_value);var left_pos=base_layer_element.textWidth()*(index_value-1)+(base_layer_element.textWidth()-$(face).textWidth())/2;$(face).appendTo(this.element).css({display:"inline-block",position:"absolute",left:left_pos}).addClass("rate-face");base_layer_element.css({visibility:"hidden"});select_layer_element.css({visibility:"hidden"});hover_layer_element.css({visibility:"hidden"})}if(!this.settings.only_select_one_symbol){var width=this.toWidth(this.value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")})}else{var width=this.toWidth(this.settings.max_value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")});this.layers.select_layer.children("span").css({visibility:"hidden"});this.layers.select_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}$(this.element).attr("data-rate-value",this.value);if(this.settings.change_once){this.settings.readonly=true}this.updateServer();var change_event=$(this.element).trigger("afterChange",{from:old_value,to:this.value});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}}};Rate.prototype.increment=function(){this.setValue(this.getValue()+this.settings.step_size)};Rate.prototype.decrement=function(){this.setValue(this.getValue()-this.settings.step_size)};$.fn.rate.settings={max_value:5,step_size:.5,initial_value:0,symbols:{utf8_star:{base:"☆",hover:"★",selected:"★"},utf8_hexagon:{base:"⬡",hover:"⬢",selected:"⬢"},hearts:"&hearts;",fontawesome_beer:'<i class="fas fa-beer"></i>',fontawesome_star:{base:'<i class="far fa-star"></i>',hover:'<i class="fas fa-star"></i>',selected:'<i class="fas fa-star"></i>'},utf8_emoticons:{base:[128549,128531,128530,128516],hover:[128549,128531,128530,128516],selected:[128549,128531,128530,128516]}},selected_symbol_type:"utf8_star",convert_to_utf8:false,cursor:"default",readonly:false,change_once:false,only_select_one_symbol:false,ajax_method:"POST",additional_data:{}}})(jQuery,window);
     3=======
     4(function($,window){$.fn.textWidth=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var width=html_calc.width();html_calc.remove();if(width==0){var total=0;$(this).eq(0).children().each(function(){total+=$(this).textWidth()});return total}return width};$.fn.textHeight=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var height=html_calc.height();html_calc.remove();return height};Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"};String.prototype.getCodePointLength=function(){return this.length-this.split(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g).length+1};String.fromCodePoint=function(){var chars=Array.prototype.slice.call(arguments);for(var i=chars.length;i-->0;){var n=chars[i]-65536;if(n>=0)chars.splice(i,1,55296+(n>>10),56320+(n&1023))}return String.fromCharCode.apply(null,chars)};$.fn.rate=function(options){if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"rate")){$.data(this,"rate",new Rate(this,options))}})}else if(typeof options==="string"){var args=arguments;var returns;this.each(function(){var instance=$.data(this,"rate");if(instance instanceof Rate&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$(instance.element).off();$.data(this,"rate",null)}});return returns!==undefined?returns:this}};function Rate(element,options){this.element=element;this.settings=$.extend({},$.fn.rate.settings,options);this.set_faces={};this.build()}Rate.prototype.build=function(){this.layers={};this.value=0;this.raise_select_layer=false;if(this.settings.initial_value){this.value=this.settings.initial_value}if($(this.element).attr("data-rate-value")){this.value=$(this.element).attr("data-rate-value")}var selected_width=this.value/this.settings.max_value*100;if(typeof this.settings.symbols[this.settings.selected_symbol_type]==="string"){var symbol=this.settings.symbols[this.settings.selected_symbol_type];this.settings.symbols[this.settings.selected_symbol_type]={};this.settings.symbols[this.settings.selected_symbol_type]["base"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["selected"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["hover"]=symbol}var base_layer=this.addLayer("base-layer",100,this.settings.symbols[this.settings.selected_symbol_type]["base"],true);var select_layer=this.addLayer("select-layer",selected_width,this.settings.symbols[this.settings.selected_symbol_type]["selected"],true);var hover_layer=this.addLayer("hover-layer",0,this.settings.symbols[this.settings.selected_symbol_type]["hover"],false);this.layers["base_layer"]=base_layer;this.layers["select_layer"]=select_layer;this.layers["hover_layer"]=hover_layer;$(this.element).on("mousemove",$.proxy(this.hover,this));$(this.element).on("click",$.proxy(this.select,this));$(this.element).on("mouseleave",$.proxy(this.mouseout,this));$(this.element).css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}};Rate.prototype.addLayer=function(layer_name,visible_width,symbol,visible){var layer_body="<div>";for(var i=0;i<this.settings.max_value;i++){if(Array.isArray(symbol)){if(this.settings.convert_to_utf8){symbol[i]=String.fromCodePoint(symbol[i])}layer_body+="<span>"+symbol[i]+"</span>"}else{if(this.settings.convert_to_utf8){symbol=String.fromCodePoint(symbol)}layer_body+="<span>"+symbol+"</span>"}}layer_body+="</div>";var layer=$(layer_body).addClass("rate-"+layer_name).appendTo(this.element);$(layer).css({width:visible_width+"%",height:$(layer).children().eq(0).textHeight(),overflow:"hidden",position:"absolute",top:0,display:visible?"block":"none","white-space":"nowrap"});$(this.element).css({width:$(layer).textWidth()+"px",height:$(layer).height(),position:"relative",cursor:this.settings.cursor});return layer};Rate.prototype.updateServer=function(){if(this.settings.url!=undefined){$.ajax({url:this.settings.url,type:this.settings.ajax_method,data:$.extend({},{value:this.getValue()},this.settings.additional_data),success:$.proxy(function(data){$(this.element).trigger("updateSuccess",[data])},this),error:$.proxy(function(jxhr,msg,err){$(this.element).trigger("updateError",[jxhr,msg,err])},this)})}};Rate.prototype.getValue=function(){return this.value};Rate.prototype.hover=function(ev){var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var val=this.toValue(x,true);if(val!=this.value){this.raise_select_layer=false}if(!this.raise_select_layer&&!this.settings.readonly){var visible_width=this.toWidth(val);this.layers.select_layer.css({display:"none"});if(!this.settings.only_select_one_symbol){this.layers.hover_layer.css({width:visible_width+"%",display:"block"})}else{var index_value=Math.floor(val);this.layers.hover_layer.css({width:"100%",display:"block"});this.layers.hover_layer.children("span").css({visibility:"hidden"});this.layers.hover_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}}};Rate.prototype.select=function(ev){if(!this.settings.readonly){var old_value=this.getValue();var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var selected_width=this.toWidth(this.toValue(x,true));this.setValue(this.toValue(selected_width));this.raise_select_layer=true}};Rate.prototype.mouseout=function(){this.layers.hover_layer.css({display:"none"});this.layers.select_layer.css({display:"block"})};Rate.prototype.toWidth=function(val){return val/this.settings.max_value*100};Rate.prototype.toValue=function(width,in_pixels){var val;if(in_pixels){val=width/this.layers.base_layer.textWidth()*this.settings.max_value}else{val=width/100*this.settings.max_value}var temp=val/this.settings.step_size;if(temp-Math.floor(temp)<5e-5){val=Math.round(val/this.settings.step_size)*this.settings.step_size}val=Math.ceil(val/this.settings.step_size)*this.settings.step_size;val=val>this.settings.max_value?this.settings.max_value:val;return val};Rate.prototype.getElement=function(layer_name,index){return $(this.element).find(".rate-"+layer_name+" span").eq(index-1)};Rate.prototype.getLayers=function(){return this.layers};Rate.prototype.setFace=function(value,face){this.set_faces[value]=face};Rate.prototype.setAdditionalData=function(data){this.settings.additional_data=data};Rate.prototype.getAdditionalData=function(){return this.settings.additional_data};Rate.prototype.removeFace=function(value){delete this.set_faces[value]};Rate.prototype.setValue=function(value){if(!this.settings.readonly){if(value<0){value=0}else if(value>this.settings.max_value){value=this.settings.max_value}var old_value=this.getValue();this.value=value;var change_event=$(this.element).trigger("change",{from:old_value,to:this.value});$(this.element).find(".rate-face").remove();$(this.element).find("span").css({visibility:"visible"});var index_value=Math.ceil(this.value);if(this.set_faces.hasOwnProperty(index_value)){var face="<div>"+this.set_faces[index_value]+"</div>";var base_layer_element=this.getElement("base-layer",index_value);var select_layer_element=this.getElement("select-layer",index_value);var hover_layer_element=this.getElement("hover-layer",index_value);var left_pos=base_layer_element.textWidth()*(index_value-1)+(base_layer_element.textWidth()-$(face).textWidth())/2;$(face).appendTo(this.element).css({display:"inline-block",position:"absolute",left:left_pos}).addClass("rate-face");base_layer_element.css({visibility:"hidden"});select_layer_element.css({visibility:"hidden"});hover_layer_element.css({visibility:"hidden"})}if(!this.settings.only_select_one_symbol){var width=this.toWidth(this.value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")})}else{var width=this.toWidth(this.settings.max_value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")});this.layers.select_layer.children("span").css({visibility:"hidden"});this.layers.select_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}$(this.element).attr("data-rate-value",this.value);if(this.settings.change_once){this.settings.readonly=true}this.updateServer();var change_event=$(this.element).trigger("afterChange",{from:old_value,to:this.value});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}}};Rate.prototype.increment=function(){this.setValue(this.getValue()+this.settings.step_size)};Rate.prototype.decrement=function(){this.setValue(this.getValue()-this.settings.step_size)};$.fn.rate.settings={max_value:5,step_size:.5,initial_value:0,symbols:{utf8_star:{base:"☆",hover:"★",selected:"★"},utf8_hexagon:{base:"⬡",hover:"⬢",selected:"⬢"},hearts:"&hearts;",fontawesome_beer:'<i class="fas fa-beer"></i>',fontawesome_star:{base:'<i class="far fa-star"></i>',hover:'<i class="fas fa-star"></i>',selected:'<i class="fas fa-star"></i>'},utf8_emoticons:{base:[128549,128531,128530,128516],hover:[128549,128531,128530,128516],selected:[128549,128531,128530,128516]}},selected_symbol_type:"utf8_star",convert_to_utf8:false,cursor:"default",readonly:false,change_once:false,only_select_one_symbol:false,ajax_method:"POST",additional_data:{}}})(jQuery,window);
     5>>>>>>> origin/main
  • flex-guten/tags/1.1.9/plugin.php

    r2974042 r3191429  
    55 * Requires at least: 6.0
    66 * Requires PHP:      5.7
    7  * Version:           1.1.2
     7 * Version:           1.1.9
    88 * Author:            Drag WP
    99 * Author URI:        https://dragwp.com
     
    4646            }
    4747
    48             require 'vendor/autoload.php';
     48            // require 'vendor/autoload.php';
     49
     50            if (file_exists(__DIR__ . '/vendor/autoload.php')) {
     51                require __DIR__ . '/vendor/autoload.php';
     52            }
    4953
    5054            // Enqueue Block Assets
     
    7478         */
    7579        private function flexguten_define_constants() {         
    76             define( 'FLEXGUTEN_VERSION', '1.0.0' );
     80            define( 'FLEXGUTEN_VERSION', '1.1.2' );
    7781            define( 'FLEXGUTEN_URL', plugin_dir_url( __FILE__ ) );
    7882            define( 'FLEXGUTEN_PATH',  __DIR__ );
     
    144148
    145149FLEXGUTEN_BLOCKS_CLASS::init();
     150
  • flex-guten/tags/1.1.9/readme.txt

    r3156176 r3191429  
    11=== Flex Guten - A Multipurpose Gutenberg Blocks Plugin ===
    2 Contributors: dragwp, devmuhib, huzaifaalmesbah
     2Contributors: dragwp, devmuhib
    33Donate link: https://dragwp.com/donate
    44Tags: pinterest, save button, amazon, product, review
    55Requires at least: 6.0
    6 Tested up to: 6.6
    7 Stable tag: 1.1.2
     6Tested up to: 6.7
     7Stable tag: 1.1.9
    88Requires PHP: 5.7
    99License: GPLv2 or later
     
    4949* Post Grid Block Added
    5050
     51**1.1.3**
     52* Post Grid Block Error Fix
     53
    5154== Upgrade Notice ==
    5255
  • flex-guten/trunk/includes/Blocks/BlockRegister/BlockRegister.php

    r2885572 r3191429  
    11<?php
    22namespace Dwp\Blocks\BlockRegister;
    3 use Dwp;
     3
     4// Added namespaces necessary for the files.
     5use Dwp\Assets;
     6use Dwp\Blocks\BlockStyle\PostGridOne\PostGridOne;
     7use Dwp\Blocks\BlockStyle\Pinterest\PinterestStyleOne;
     8use Dwp\Blocks\BlockStyle\Amazon\AmazonReviewOne;
    49
    510class BlockRegister
    611{
    7     public $asset;   
     12    public $asset;
    813
    9     function __construct(){
    10         add_action( 'init', [ $this, 'flexguten_blocks_init' ] );
    11         $this->asset = new Dwp\Assets();
     14    public function __construct()
     15    {
     16        add_action('init', [$this, 'flexguten_blocks_init']);
     17        $this->asset = new Assets(); // Ensure the Assets class is correctly autoloaded
    1218    }
    1319
    1420    /**
    1521     * Blocks Register
    16     */
    17     public function flexguten_register_block( $name, $options = array() ) {
    18         register_block_type( FLEXGUTEN_PATH . '/build/blocks/' . $name, $options );
     22     */
     23    public function flexguten_register_block($name, $options = array())
     24    {
     25        register_block_type(FLEXGUTEN_PATH . '/build/blocks/' . $name, $options);
    1926    }
    2027
    2128    /**
    2229     * Blocks Initialization
    23     */
    24     public function flexguten_blocks_init() {       
    25        
    26         /**
    27          * Register Pinterest Block
    28         */
    29         $this->flexguten_register_block( 'pinterest-style-one',[
    30             'render_callback' => [$this,'pinterest_style_one_render_callback']
    31         ]  );       
    32        
    33         /**
    34          * Register Amazon Review Block
    35         */
    36         $this->flexguten_register_block( 'amazon-review-one',[
    37             'render_callback' => [$this,'amazon_review_one_render_callback']
    38         ]  );     
    39        
    40         /**
    41          * Register Post Grid Block
    42         */
    43         $this->flexguten_register_block( 'post-grid-one',[
    44             'render_callback' => [$this,'post_grid_block_render_callback']
    45         ]  );
    46        
     30     */
     31    public function flexguten_blocks_init()
     32    {
     33        // Register Pinterest Block
     34        $this->flexguten_register_block('pinterest-style-one', [
     35            'render_callback' => [$this, 'pinterest_style_one_render_callback']
     36        ]);
     37
     38        // Register Amazon Review Block
     39        $this->flexguten_register_block('amazon-review-one', [
     40            'render_callback' => [$this, 'amazon_review_one_render_callback']
     41        ]);
     42
     43        // Register Post Grid Block
     44        $this->flexguten_register_block('post-grid-one', [
     45            'render_callback' => [$this, 'post_grid_block_render_callback']
     46        ]);
    4747    }
    4848
    4949    /**
    5050     * Pinterest Style One Callback
    51     */
    52     public function pinterest_style_one_render_callback($attr, $output){
     51     */
     52    public function pinterest_style_one_render_callback($attr, $output)
     53    {
     54        $PinterestBlock = new PinterestStyleOne();
     55        $id = $attr['id'] ?? ''; // Sanitize and validate attribute
    5356
    54         $PinterestBlock = new Dwp\Blocks\BlockStyle\Pinterest\PinterestStyleOne();
    55         $id = $attr['id'];
    56 
    57         /**
    58          * Pinterest Style One Editor Style
    59         */
     57        // Pinterest Style One Editor Style
    6058        $this->asset->flexguten_inline_style(
    6159            $id,
    62             $PinterestBlock->flexguten_frontend_styles($attr, $id )
     60            $PinterestBlock->flexguten_frontend_styles($attr, $id)
    6361        );
    64        
    65         /**
    66          * Pinterest Style One Frontend
    67         */
    68         return $PinterestBlock->flexguten_frontend_render( $attr, $id );
    6962
     63        // Pinterest Style One Frontend
     64        return $PinterestBlock->flexguten_frontend_render($attr, $id);
    7065    }
    7166
    7267    /**
    7368     * Amazon Review One Callback
    74     */
    75     public function amazon_review_one_render_callback($attr, $output){
     69     */
     70    public function amazon_review_one_render_callback($attr, $output)
     71    {
     72        $AmazonReviewOne = new AmazonReviewOne();
     73        $id = $attr['id'] ?? ''; // Sanitize and validate attribute
    7674
    77         $AmazonReviewOne = new Dwp\Blocks\BlockStyle\Amazon\AmazonReviewOne();
    78         $id = $attr['id'];
    79 
    80         /**
    81          * Amazon Style One Editor Style
    82         */
     75        // Amazon Style One Editor Style
    8376        $this->asset->flexguten_inline_style(
    8477            $id,
    85             $AmazonReviewOne->flexguten_frontend_styles($attr, $id )
     78            $AmazonReviewOne->flexguten_frontend_styles($attr, $id)
    8679        );
    87        
    88         /**
    89          * Amazon Style One Frontend
    90         */
    91         //return $AmazonReviewOne->flexguten_frontend_render( $attr, $id );
    9280
    93         return $output;
    94 
     81        // Amazon Style One Frontend
     82        return $AmazonReviewOne->flexguten_frontend_render($attr, $id);
    9583    }
    9684
    9785    /**
    9886     * Post Grid One Render Callback
    99     */
    100     public function post_grid_block_render_callback($attr, $output){
     87     */
     88    public function post_grid_block_render_callback($attr, $output)
     89    {
     90        $PostGridOne = new PostGridOne();
     91        $id = $attr['id'] ?? ''; // Sanitize and validate attribute
    10192
    102         $PostGridOne = new Dwp\Blocks\BlockStyle\PostGridOne\PostGridOne();
    103         $id = $attr['id'];
     93        // Post Grid One Editor Style
     94        $this->asset->flexguten_inline_style(
     95            $id,
     96            $PostGridOne->flexguten_frontend_styles($attr, $id)
     97        );
    10498
    105         /**
    106          * Post Grid One Editor Style
    107         */
    108         $this->asset->flexguten_inline_style(           
    109             $id,
    110             $PostGridOne->flexguten_frontend_styles($attr, $id )
    111         );
    112        
    113         /**
    114          * Post Grid One Frontend
    115         */
    116         return $PostGridOne->flexguten_frontend_render( $attr, $id );
    117 
    118         return $output;
    119 
     99        // Post Grid One Frontend
     100        return $PostGridOne->flexguten_frontend_render($attr, $id);
    120101    }
    121 
    122102}
  • flex-guten/trunk/includes/Blocks/BlockStyle/Amazon/AmazonReviewOne.php

    r2879752 r3191429  
    8585
    8686}
     87
  • flex-guten/trunk/includes/assets/css/main.css

    r2878306 r3191429  
     1<<<<<<< HEAD
    12/* body {
    23    background: green !important;
     
    56    color: green;
    67} */
     8=======
     9/* body {
     10    background: green !important;
     11}
     12h1 {
     13    color: green;
     14} */
     15>>>>>>> origin/main
  • flex-guten/trunk/includes/assets/fonts/merriweather.css

    r2878306 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: merriweather;
     
    5556        url(./merriweather/Merriweather-HeavyItalic.woff) format("woff");
    5657}
     58=======
     59@font-face {
     60    font-family: merriweather;
     61    font-style: italic;
     62    font-weight: 400;
     63    src: local("Merriweather"),
     64        url(./merriweather/Merriweather-Italic.woff) format("woff");
     65}
     66@font-face {
     67    font-family: merriweather;
     68    font-style: normal;
     69    font-weight: 250;
     70    src: local("Merriweather"),
     71        url(./merriweather/Merriweather-Regular.woff) format("woff");
     72}
     73@font-face {
     74    font-family: merriweather;
     75    font-style: normal;
     76    font-weight: 250;
     77    src: local("Merriweather"),
     78        url(./merriweather/Merriweather-Light.woff) format("woff");
     79}
     80@font-face {
     81    font-family: merriweather;
     82    font-style: italic;
     83    font-weight: 300;
     84    src: local("Merriweather"),
     85        url(./merriweather/Merriweather-LightItalic.woff) format("woff");
     86}
     87@font-face {
     88    font-family: merriweather;
     89    font-style: normal;
     90    font-weight: 700;
     91    src: local("Merriweather"),
     92        url(./merriweather/Merriweather-Bold.woff) format("woff");
     93}
     94@font-face {
     95    font-family: merriweather;
     96    font-style: italic;
     97    font-weight: 700;
     98    src: local("Merriweather"),
     99        url(./merriweather/Merriweather-BoldItalic.woff) format("woff");
     100}
     101@font-face {
     102    font-family: merriweather;
     103    font-style: normal;
     104    font-weight: 900;
     105    src: local("Merriweather"),
     106        url(./merriweather/Merriweather-Black.woff) format("woff");
     107}
     108@font-face {
     109    font-family: merriweather;
     110    font-style: italic;
     111    font-weight: 900;
     112    src: local("Merriweather"),
     113        url(./merriweather/Merriweather-HeavyItalic.woff) format("woff");
     114}
     115>>>>>>> origin/main
  • flex-guten/trunk/includes/assets/fonts/nunito.css

    r2879752 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: "Nunito";
     
    6162    src: local("Nunito"), url("./nunito/Nunito-BlackItalic.woff") format("woff");
    6263}
     64=======
     65@font-face {
     66    font-family: "Nunito";
     67    font-style: normal;
     68    font-weight: 400;
     69    src: local("Nunito"), url("./nunito/Nunito-Regular.woff") format("woff");
     70}
     71@font-face {
     72    font-family: "Nunito";
     73    font-style: italic;
     74    font-weight: 400;
     75    src: local("Nunito"), url("./nunito/Nunito-Italic.woff") format("woff");
     76}
     77@font-face {
     78    font-family: "Nunito";
     79    font-style: normal;
     80    font-weight: 600;
     81    src: local("Nunito"), url("./nunito/Nunito-SemiBold.woff") format("woff");
     82}
     83@font-face {
     84    font-family: "Nunito";
     85    font-style: italic;
     86    font-weight: 600;
     87    src: local("Nunito"),
     88        url("./nunito/Nunito-SemiBoldItalic.woff") format("woff");
     89}
     90@font-face {
     91    font-family: "Nunito";
     92    font-style: normal;
     93    font-weight: 700;
     94    src: local("Nunito"), url("./nunito/Nunito-Bold.woff") format("woff");
     95}
     96@font-face {
     97    font-family: "Nunito";
     98    font-style: italic;
     99    font-weight: 700;
     100    src: local("Nunito"), url("./nunito/Nunito-BoldItalic.woff") format("woff");
     101}
     102@font-face {
     103    font-family: "Nunito";
     104    font-style: normal;
     105    font-weight: 800;
     106    src: local("Nunito"), url("./nunito/Nunito-ExtraBold.woff") format("woff");
     107}
     108@font-face {
     109    font-family: "Nunito";
     110    font-style: italic;
     111    font-weight: 800;
     112    src: local("Nunito"),
     113        url("./nunito/Nunito-ExtraBoldItalic.woff") format("woff");
     114}
     115@font-face {
     116    font-family: "Nunito";
     117    font-style: normal;
     118    font-weight: 900;
     119    src: local("Nunito"), url("./nunito/Nunito-Black.woff") format("woff");
     120}
     121@font-face {
     122    font-family: "Nunito";
     123    font-style: italic;
     124    font-weight: 900;
     125    src: local("Nunito"), url("./nunito/Nunito-BlackItalic.woff") format("woff");
     126}
     127>>>>>>> origin/main
  • flex-guten/trunk/includes/assets/fonts/proxima-nova-2.css

    r2878306 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: proxima nova;
     
    9596        url("./proxima-nova-2/Black.woff") format("woff");
    9697}
     98=======
     99@font-face {
     100    font-family: proxima nova;
     101    font-style: normal;
     102    font-weight: 400;
     103    src: local("Proxima Nova"),
     104        url("./proxima-nova-2/Regular-Italic.woff") format("woff");
     105}
     106@font-face {
     107    font-family: proxima nova;
     108    font-style: normal;
     109    font-weight: 400;
     110    src: local("Proxima Nova"),
     111        url("./proxima-nova-2/Regular.woff") format("woff");
     112}
     113@font-face {
     114    font-family: proxima nova;
     115    font-style: normal;
     116    font-weight: 250;
     117    src: local("Proxima Nova"),
     118        url("./proxima-nova-2/Thin-Italic.woff") format("woff");
     119}
     120@font-face {
     121    font-family: proxima nova;
     122    font-style: normal;
     123    font-weight: 250;
     124    src: local("Proxima Nova"), url("./proxima-nova-2/Thin.woff") format("woff");
     125}
     126@font-face {
     127    font-family: proxima nova;
     128    font-style: normal;
     129    font-weight: 300;
     130    src: local("Proxima Nova"),
     131        url("./proxima-nova-2/Light.woff") format("woff");
     132}
     133@font-face {
     134    font-family: proxima nova;
     135    font-style: italic;
     136    font-weight: 300;
     137    src: local("Proxima Nova"),
     138        url("./proxima-nova-2/Light-Italic.woff") format("woff");
     139}
     140@font-face {
     141    font-family: proxima nova;
     142    font-style: normal;
     143    font-weight: 600;
     144    src: local("Proxima Nova"),
     145        url("./proxima-nova-2/Semibold-Italic.woff") format("woff");
     146}
     147@font-face {
     148    font-family: proxima nova;
     149    font-style: normal;
     150    font-weight: 600;
     151    src: local("Proxima Nova"),
     152        url("./proxima-nova-2/Semibold.woff") format("woff");
     153}
     154@font-face {
     155    font-family: proxima nova;
     156    font-style: normal;
     157    font-weight: 700;
     158    src: local("Proxima Nova"),
     159        url("./proxima-nova-2/Bold-Italic.woff") format("woff");
     160}
     161@font-face {
     162    font-family: proxima nova;
     163    font-style: normal;
     164    font-weight: 700;
     165    src: local("Proxima Nova"), url("./proxima-nova-2/Bold.woff") format("woff");
     166}
     167@font-face {
     168    font-family: proxima nova;
     169    font-style: normal;
     170    font-weight: 800;
     171    src: local("Proxima Nova"),
     172        url("./proxima-nova-2/Extrabold-Italic.woff") format("woff");
     173}
     174@font-face {
     175    font-family: proxima nova;
     176    font-style: normal;
     177    font-weight: 800;
     178    src: local("Proxima Nova"),
     179        url("./proxima-nova-2/Extrabold.woff") format("woff");
     180}
     181@font-face {
     182    font-family: proxima nova;
     183    font-style: normal;
     184    font-weight: 900;
     185    src: local("Proxima Nova"),
     186        url("./proxima-nova-2/Black-Italic.woff") format("woff");
     187}
     188@font-face {
     189    font-family: proxima nova;
     190    font-style: normal;
     191    font-weight: 900;
     192    src: local("Proxima Nova"),
     193        url("./proxima-nova-2/Black.woff") format("woff");
     194}
     195>>>>>>> origin/main
  • flex-guten/trunk/includes/assets/fonts/sharp-sans.css

    r2879752 r3191429  
     1<<<<<<< HEAD
    12@font-face {
    23    font-family: "Sharp Sans";
     
    8990    src: local("Sharp Sans"), url("./sharp-sans/Extrabold.woff") format("woff");
    9091}
     92=======
     93@font-face {
     94    font-family: "Sharp Sans";
     95    font-style: normal;
     96    font-weight: 400;
     97    src: local("Sharp Sans"), url("./sharp-sans/Italic.woff") format("woff");
     98}
     99@font-face {
     100    font-family: "Sharp Sans";
     101    font-style: normal;
     102    font-weight: 400;
     103    src: local("Sharp Sans"), url("./sharp-sans/Sharp-Sans.woff") format("woff");
     104}
     105@font-face {
     106    font-family: "Sharp Sans";
     107    font-style: normal;
     108    font-weight: 280;
     109    src: local("Sharp Sans"),
     110        url("./sharp-sans/Thin-Italic.woff") format("woff");
     111}
     112@font-face {
     113    font-family: "Sharp Sans";
     114    font-style: normal;
     115    font-weight: 280;
     116    src: local("Sharp Sans"), url("./sharp-sans/Thin.woff") format("woff");
     117}
     118@font-face {
     119    font-family: "Sharp Sans";
     120    font-style: normal;
     121    font-weight: 300;
     122    src: local("Sharp Sans"),
     123        url("./sharp-sans/Light-Italic.woff") format("woff");
     124}
     125@font-face {
     126    font-family: "Sharp Sans";
     127    font-style: normal;
     128    font-weight: 300;
     129    src: local("Sharp Sans"), url("./sharp-sans/Light.woff") format("woff");
     130}
     131@font-face {
     132    font-family: "Sharp Sans";
     133    font-style: normal;
     134    font-weight: 500;
     135    src: local("Sharp Sans"),
     136        url("./sharp-sans/Medium-Italic.woff") format("woff");
     137}
     138@font-face {
     139    font-family: "Sharp Sans";
     140    font-style: normal;
     141    font-weight: 500;
     142    src: local("Sharp Sans"), url("./sharp-sans/Medium.woff") format("woff");
     143}
     144@font-face {
     145    font-family: "Sharp Sans";
     146    font-style: normal;
     147    font-weight: 600;
     148    src: local("Sharp Sans"),
     149        url("./sharp-sans/Semibold-Italic.woff") format("woff");
     150}
     151@font-face {
     152    font-family: "Sharp Sans";
     153    font-style: normal;
     154    font-weight: 600;
     155    src: local("Sharp Sans"), url("./sharp-sans/Semibold.woff") format("woff");
     156}
     157@font-face {
     158    font-family: "Sharp Sans";
     159    font-style: normal;
     160    font-weight: 700;
     161    src: local("Sharp Sans"),
     162        url("./sharp-sans/Bold-Italic.woff") format("woff");
     163}
     164@font-face {
     165    font-family: "Sharp Sans";
     166    font-style: normal;
     167    font-weight: 700;
     168    src: local("Sharp Sans"), url("./sharp-sans/Bold.woff") format("woff");
     169}
     170@font-face {
     171    font-family: "Sharp Sans";
     172    font-style: normal;
     173    font-weight: 800;
     174    src: local("Sharp Sans"),
     175        url("./sharp-sans/ExtraBold-Italic.woff") format("woff");
     176}
     177@font-face {
     178    font-family: "Sharp Sans";
     179    font-style: normal;
     180    font-weight: 800;
     181    src: local("Sharp Sans"), url("./sharp-sans/Extrabold.woff") format("woff");
     182}
     183>>>>>>> origin/main
  • flex-guten/trunk/includes/assets/js/plugin.js

    r2878306 r3191429  
     1<<<<<<< HEAD
    12(function ($) {
    23    $('.rating').rate({ readonly: true });
    34})(jQuery);
     5=======
     6(function ($) {
     7    $('.rating').rate({ readonly: true });
     8})(jQuery);
     9>>>>>>> origin/main
  • flex-guten/trunk/includes/assets/js/rater.min.js

    r2879752 r3191429  
     1<<<<<<< HEAD
    12(function($,window){$.fn.textWidth=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var width=html_calc.width();html_calc.remove();if(width==0){var total=0;$(this).eq(0).children().each(function(){total+=$(this).textWidth()});return total}return width};$.fn.textHeight=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var height=html_calc.height();html_calc.remove();return height};Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"};String.prototype.getCodePointLength=function(){return this.length-this.split(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g).length+1};String.fromCodePoint=function(){var chars=Array.prototype.slice.call(arguments);for(var i=chars.length;i-->0;){var n=chars[i]-65536;if(n>=0)chars.splice(i,1,55296+(n>>10),56320+(n&1023))}return String.fromCharCode.apply(null,chars)};$.fn.rate=function(options){if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"rate")){$.data(this,"rate",new Rate(this,options))}})}else if(typeof options==="string"){var args=arguments;var returns;this.each(function(){var instance=$.data(this,"rate");if(instance instanceof Rate&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$(instance.element).off();$.data(this,"rate",null)}});return returns!==undefined?returns:this}};function Rate(element,options){this.element=element;this.settings=$.extend({},$.fn.rate.settings,options);this.set_faces={};this.build()}Rate.prototype.build=function(){this.layers={};this.value=0;this.raise_select_layer=false;if(this.settings.initial_value){this.value=this.settings.initial_value}if($(this.element).attr("data-rate-value")){this.value=$(this.element).attr("data-rate-value")}var selected_width=this.value/this.settings.max_value*100;if(typeof this.settings.symbols[this.settings.selected_symbol_type]==="string"){var symbol=this.settings.symbols[this.settings.selected_symbol_type];this.settings.symbols[this.settings.selected_symbol_type]={};this.settings.symbols[this.settings.selected_symbol_type]["base"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["selected"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["hover"]=symbol}var base_layer=this.addLayer("base-layer",100,this.settings.symbols[this.settings.selected_symbol_type]["base"],true);var select_layer=this.addLayer("select-layer",selected_width,this.settings.symbols[this.settings.selected_symbol_type]["selected"],true);var hover_layer=this.addLayer("hover-layer",0,this.settings.symbols[this.settings.selected_symbol_type]["hover"],false);this.layers["base_layer"]=base_layer;this.layers["select_layer"]=select_layer;this.layers["hover_layer"]=hover_layer;$(this.element).on("mousemove",$.proxy(this.hover,this));$(this.element).on("click",$.proxy(this.select,this));$(this.element).on("mouseleave",$.proxy(this.mouseout,this));$(this.element).css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}};Rate.prototype.addLayer=function(layer_name,visible_width,symbol,visible){var layer_body="<div>";for(var i=0;i<this.settings.max_value;i++){if(Array.isArray(symbol)){if(this.settings.convert_to_utf8){symbol[i]=String.fromCodePoint(symbol[i])}layer_body+="<span>"+symbol[i]+"</span>"}else{if(this.settings.convert_to_utf8){symbol=String.fromCodePoint(symbol)}layer_body+="<span>"+symbol+"</span>"}}layer_body+="</div>";var layer=$(layer_body).addClass("rate-"+layer_name).appendTo(this.element);$(layer).css({width:visible_width+"%",height:$(layer).children().eq(0).textHeight(),overflow:"hidden",position:"absolute",top:0,display:visible?"block":"none","white-space":"nowrap"});$(this.element).css({width:$(layer).textWidth()+"px",height:$(layer).height(),position:"relative",cursor:this.settings.cursor});return layer};Rate.prototype.updateServer=function(){if(this.settings.url!=undefined){$.ajax({url:this.settings.url,type:this.settings.ajax_method,data:$.extend({},{value:this.getValue()},this.settings.additional_data),success:$.proxy(function(data){$(this.element).trigger("updateSuccess",[data])},this),error:$.proxy(function(jxhr,msg,err){$(this.element).trigger("updateError",[jxhr,msg,err])},this)})}};Rate.prototype.getValue=function(){return this.value};Rate.prototype.hover=function(ev){var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var val=this.toValue(x,true);if(val!=this.value){this.raise_select_layer=false}if(!this.raise_select_layer&&!this.settings.readonly){var visible_width=this.toWidth(val);this.layers.select_layer.css({display:"none"});if(!this.settings.only_select_one_symbol){this.layers.hover_layer.css({width:visible_width+"%",display:"block"})}else{var index_value=Math.floor(val);this.layers.hover_layer.css({width:"100%",display:"block"});this.layers.hover_layer.children("span").css({visibility:"hidden"});this.layers.hover_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}}};Rate.prototype.select=function(ev){if(!this.settings.readonly){var old_value=this.getValue();var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var selected_width=this.toWidth(this.toValue(x,true));this.setValue(this.toValue(selected_width));this.raise_select_layer=true}};Rate.prototype.mouseout=function(){this.layers.hover_layer.css({display:"none"});this.layers.select_layer.css({display:"block"})};Rate.prototype.toWidth=function(val){return val/this.settings.max_value*100};Rate.prototype.toValue=function(width,in_pixels){var val;if(in_pixels){val=width/this.layers.base_layer.textWidth()*this.settings.max_value}else{val=width/100*this.settings.max_value}var temp=val/this.settings.step_size;if(temp-Math.floor(temp)<5e-5){val=Math.round(val/this.settings.step_size)*this.settings.step_size}val=Math.ceil(val/this.settings.step_size)*this.settings.step_size;val=val>this.settings.max_value?this.settings.max_value:val;return val};Rate.prototype.getElement=function(layer_name,index){return $(this.element).find(".rate-"+layer_name+" span").eq(index-1)};Rate.prototype.getLayers=function(){return this.layers};Rate.prototype.setFace=function(value,face){this.set_faces[value]=face};Rate.prototype.setAdditionalData=function(data){this.settings.additional_data=data};Rate.prototype.getAdditionalData=function(){return this.settings.additional_data};Rate.prototype.removeFace=function(value){delete this.set_faces[value]};Rate.prototype.setValue=function(value){if(!this.settings.readonly){if(value<0){value=0}else if(value>this.settings.max_value){value=this.settings.max_value}var old_value=this.getValue();this.value=value;var change_event=$(this.element).trigger("change",{from:old_value,to:this.value});$(this.element).find(".rate-face").remove();$(this.element).find("span").css({visibility:"visible"});var index_value=Math.ceil(this.value);if(this.set_faces.hasOwnProperty(index_value)){var face="<div>"+this.set_faces[index_value]+"</div>";var base_layer_element=this.getElement("base-layer",index_value);var select_layer_element=this.getElement("select-layer",index_value);var hover_layer_element=this.getElement("hover-layer",index_value);var left_pos=base_layer_element.textWidth()*(index_value-1)+(base_layer_element.textWidth()-$(face).textWidth())/2;$(face).appendTo(this.element).css({display:"inline-block",position:"absolute",left:left_pos}).addClass("rate-face");base_layer_element.css({visibility:"hidden"});select_layer_element.css({visibility:"hidden"});hover_layer_element.css({visibility:"hidden"})}if(!this.settings.only_select_one_symbol){var width=this.toWidth(this.value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")})}else{var width=this.toWidth(this.settings.max_value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")});this.layers.select_layer.children("span").css({visibility:"hidden"});this.layers.select_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}$(this.element).attr("data-rate-value",this.value);if(this.settings.change_once){this.settings.readonly=true}this.updateServer();var change_event=$(this.element).trigger("afterChange",{from:old_value,to:this.value});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}}};Rate.prototype.increment=function(){this.setValue(this.getValue()+this.settings.step_size)};Rate.prototype.decrement=function(){this.setValue(this.getValue()-this.settings.step_size)};$.fn.rate.settings={max_value:5,step_size:.5,initial_value:0,symbols:{utf8_star:{base:"☆",hover:"★",selected:"★"},utf8_hexagon:{base:"⬡",hover:"⬢",selected:"⬢"},hearts:"&hearts;",fontawesome_beer:'<i class="fas fa-beer"></i>',fontawesome_star:{base:'<i class="far fa-star"></i>',hover:'<i class="fas fa-star"></i>',selected:'<i class="fas fa-star"></i>'},utf8_emoticons:{base:[128549,128531,128530,128516],hover:[128549,128531,128530,128516],selected:[128549,128531,128530,128516]}},selected_symbol_type:"utf8_star",convert_to_utf8:false,cursor:"default",readonly:false,change_once:false,only_select_one_symbol:false,ajax_method:"POST",additional_data:{}}})(jQuery,window);
     3=======
     4(function($,window){$.fn.textWidth=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var width=html_calc.width();html_calc.remove();if(width==0){var total=0;$(this).eq(0).children().each(function(){total+=$(this).textWidth()});return total}return width};$.fn.textHeight=function(){var html_calc=$("<span>"+$(this).html()+"</span>");html_calc.css("font-size",$(this).css("font-size")).hide();html_calc.prependTo("body");var height=html_calc.height();html_calc.remove();return height};Array.isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"};String.prototype.getCodePointLength=function(){return this.length-this.split(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g).length+1};String.fromCodePoint=function(){var chars=Array.prototype.slice.call(arguments);for(var i=chars.length;i-->0;){var n=chars[i]-65536;if(n>=0)chars.splice(i,1,55296+(n>>10),56320+(n&1023))}return String.fromCharCode.apply(null,chars)};$.fn.rate=function(options){if(options===undefined||typeof options==="object"){return this.each(function(){if(!$.data(this,"rate")){$.data(this,"rate",new Rate(this,options))}})}else if(typeof options==="string"){var args=arguments;var returns;this.each(function(){var instance=$.data(this,"rate");if(instance instanceof Rate&&typeof instance[options]==="function"){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))}if(options==="destroy"){$(instance.element).off();$.data(this,"rate",null)}});return returns!==undefined?returns:this}};function Rate(element,options){this.element=element;this.settings=$.extend({},$.fn.rate.settings,options);this.set_faces={};this.build()}Rate.prototype.build=function(){this.layers={};this.value=0;this.raise_select_layer=false;if(this.settings.initial_value){this.value=this.settings.initial_value}if($(this.element).attr("data-rate-value")){this.value=$(this.element).attr("data-rate-value")}var selected_width=this.value/this.settings.max_value*100;if(typeof this.settings.symbols[this.settings.selected_symbol_type]==="string"){var symbol=this.settings.symbols[this.settings.selected_symbol_type];this.settings.symbols[this.settings.selected_symbol_type]={};this.settings.symbols[this.settings.selected_symbol_type]["base"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["selected"]=symbol;this.settings.symbols[this.settings.selected_symbol_type]["hover"]=symbol}var base_layer=this.addLayer("base-layer",100,this.settings.symbols[this.settings.selected_symbol_type]["base"],true);var select_layer=this.addLayer("select-layer",selected_width,this.settings.symbols[this.settings.selected_symbol_type]["selected"],true);var hover_layer=this.addLayer("hover-layer",0,this.settings.symbols[this.settings.selected_symbol_type]["hover"],false);this.layers["base_layer"]=base_layer;this.layers["select_layer"]=select_layer;this.layers["hover_layer"]=hover_layer;$(this.element).on("mousemove",$.proxy(this.hover,this));$(this.element).on("click",$.proxy(this.select,this));$(this.element).on("mouseleave",$.proxy(this.mouseout,this));$(this.element).css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}};Rate.prototype.addLayer=function(layer_name,visible_width,symbol,visible){var layer_body="<div>";for(var i=0;i<this.settings.max_value;i++){if(Array.isArray(symbol)){if(this.settings.convert_to_utf8){symbol[i]=String.fromCodePoint(symbol[i])}layer_body+="<span>"+symbol[i]+"</span>"}else{if(this.settings.convert_to_utf8){symbol=String.fromCodePoint(symbol)}layer_body+="<span>"+symbol+"</span>"}}layer_body+="</div>";var layer=$(layer_body).addClass("rate-"+layer_name).appendTo(this.element);$(layer).css({width:visible_width+"%",height:$(layer).children().eq(0).textHeight(),overflow:"hidden",position:"absolute",top:0,display:visible?"block":"none","white-space":"nowrap"});$(this.element).css({width:$(layer).textWidth()+"px",height:$(layer).height(),position:"relative",cursor:this.settings.cursor});return layer};Rate.prototype.updateServer=function(){if(this.settings.url!=undefined){$.ajax({url:this.settings.url,type:this.settings.ajax_method,data:$.extend({},{value:this.getValue()},this.settings.additional_data),success:$.proxy(function(data){$(this.element).trigger("updateSuccess",[data])},this),error:$.proxy(function(jxhr,msg,err){$(this.element).trigger("updateError",[jxhr,msg,err])},this)})}};Rate.prototype.getValue=function(){return this.value};Rate.prototype.hover=function(ev){var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var val=this.toValue(x,true);if(val!=this.value){this.raise_select_layer=false}if(!this.raise_select_layer&&!this.settings.readonly){var visible_width=this.toWidth(val);this.layers.select_layer.css({display:"none"});if(!this.settings.only_select_one_symbol){this.layers.hover_layer.css({width:visible_width+"%",display:"block"})}else{var index_value=Math.floor(val);this.layers.hover_layer.css({width:"100%",display:"block"});this.layers.hover_layer.children("span").css({visibility:"hidden"});this.layers.hover_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}}};Rate.prototype.select=function(ev){if(!this.settings.readonly){var old_value=this.getValue();var pad=parseInt($(this.element).css("padding-left").replace("px",""));var x=ev.pageX-$(this.element).offset().left-pad;var selected_width=this.toWidth(this.toValue(x,true));this.setValue(this.toValue(selected_width));this.raise_select_layer=true}};Rate.prototype.mouseout=function(){this.layers.hover_layer.css({display:"none"});this.layers.select_layer.css({display:"block"})};Rate.prototype.toWidth=function(val){return val/this.settings.max_value*100};Rate.prototype.toValue=function(width,in_pixels){var val;if(in_pixels){val=width/this.layers.base_layer.textWidth()*this.settings.max_value}else{val=width/100*this.settings.max_value}var temp=val/this.settings.step_size;if(temp-Math.floor(temp)<5e-5){val=Math.round(val/this.settings.step_size)*this.settings.step_size}val=Math.ceil(val/this.settings.step_size)*this.settings.step_size;val=val>this.settings.max_value?this.settings.max_value:val;return val};Rate.prototype.getElement=function(layer_name,index){return $(this.element).find(".rate-"+layer_name+" span").eq(index-1)};Rate.prototype.getLayers=function(){return this.layers};Rate.prototype.setFace=function(value,face){this.set_faces[value]=face};Rate.prototype.setAdditionalData=function(data){this.settings.additional_data=data};Rate.prototype.getAdditionalData=function(){return this.settings.additional_data};Rate.prototype.removeFace=function(value){delete this.set_faces[value]};Rate.prototype.setValue=function(value){if(!this.settings.readonly){if(value<0){value=0}else if(value>this.settings.max_value){value=this.settings.max_value}var old_value=this.getValue();this.value=value;var change_event=$(this.element).trigger("change",{from:old_value,to:this.value});$(this.element).find(".rate-face").remove();$(this.element).find("span").css({visibility:"visible"});var index_value=Math.ceil(this.value);if(this.set_faces.hasOwnProperty(index_value)){var face="<div>"+this.set_faces[index_value]+"</div>";var base_layer_element=this.getElement("base-layer",index_value);var select_layer_element=this.getElement("select-layer",index_value);var hover_layer_element=this.getElement("hover-layer",index_value);var left_pos=base_layer_element.textWidth()*(index_value-1)+(base_layer_element.textWidth()-$(face).textWidth())/2;$(face).appendTo(this.element).css({display:"inline-block",position:"absolute",left:left_pos}).addClass("rate-face");base_layer_element.css({visibility:"hidden"});select_layer_element.css({visibility:"hidden"});hover_layer_element.css({visibility:"hidden"})}if(!this.settings.only_select_one_symbol){var width=this.toWidth(this.value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")})}else{var width=this.toWidth(this.settings.max_value);this.layers.select_layer.css({display:"block",width:width+"%",height:this.layers.base_layer.css("height")});this.layers.hover_layer.css({display:"none",height:this.layers.base_layer.css("height")});this.layers.select_layer.children("span").css({visibility:"hidden"});this.layers.select_layer.children("span").eq(index_value!=0?index_value-1:0).css({visibility:"visible"})}$(this.element).attr("data-rate-value",this.value);if(this.settings.change_once){this.settings.readonly=true}this.updateServer();var change_event=$(this.element).trigger("afterChange",{from:old_value,to:this.value});if(this.settings.hasOwnProperty("update_input_field_name")){this.settings.update_input_field_name.val(this.value)}}};Rate.prototype.increment=function(){this.setValue(this.getValue()+this.settings.step_size)};Rate.prototype.decrement=function(){this.setValue(this.getValue()-this.settings.step_size)};$.fn.rate.settings={max_value:5,step_size:.5,initial_value:0,symbols:{utf8_star:{base:"☆",hover:"★",selected:"★"},utf8_hexagon:{base:"⬡",hover:"⬢",selected:"⬢"},hearts:"&hearts;",fontawesome_beer:'<i class="fas fa-beer"></i>',fontawesome_star:{base:'<i class="far fa-star"></i>',hover:'<i class="fas fa-star"></i>',selected:'<i class="fas fa-star"></i>'},utf8_emoticons:{base:[128549,128531,128530,128516],hover:[128549,128531,128530,128516],selected:[128549,128531,128530,128516]}},selected_symbol_type:"utf8_star",convert_to_utf8:false,cursor:"default",readonly:false,change_once:false,only_select_one_symbol:false,ajax_method:"POST",additional_data:{}}})(jQuery,window);
     5>>>>>>> origin/main
  • flex-guten/trunk/plugin.php

    r2974042 r3191429  
    55 * Requires at least: 6.0
    66 * Requires PHP:      5.7
    7  * Version:           1.1.2
     7 * Version:           1.1.9
    88 * Author:            Drag WP
    99 * Author URI:        https://dragwp.com
     
    4646            }
    4747
    48             require 'vendor/autoload.php';
     48            // require 'vendor/autoload.php';
     49
     50            if (file_exists(__DIR__ . '/vendor/autoload.php')) {
     51                require __DIR__ . '/vendor/autoload.php';
     52            }
    4953
    5054            // Enqueue Block Assets
     
    7478         */
    7579        private function flexguten_define_constants() {         
    76             define( 'FLEXGUTEN_VERSION', '1.0.0' );
     80            define( 'FLEXGUTEN_VERSION', '1.1.2' );
    7781            define( 'FLEXGUTEN_URL', plugin_dir_url( __FILE__ ) );
    7882            define( 'FLEXGUTEN_PATH',  __DIR__ );
     
    144148
    145149FLEXGUTEN_BLOCKS_CLASS::init();
     150
  • flex-guten/trunk/readme.txt

    r3156176 r3191429  
    11=== Flex Guten - A Multipurpose Gutenberg Blocks Plugin ===
    2 Contributors: dragwp, devmuhib, huzaifaalmesbah
     2Contributors: dragwp, devmuhib
    33Donate link: https://dragwp.com/donate
    44Tags: pinterest, save button, amazon, product, review
    55Requires at least: 6.0
    6 Tested up to: 6.6
    7 Stable tag: 1.1.2
     6Tested up to: 6.7
     7Stable tag: 1.1.9
    88Requires PHP: 5.7
    99License: GPLv2 or later
     
    4949* Post Grid Block Added
    5050
     51**1.1.3**
     52* Post Grid Block Error Fix
     53
    5154== Upgrade Notice ==
    5255
Note: See TracChangeset for help on using the changeset viewer.