Browse Source

Update plugins with new structure

jmontoyaa 8 years ago
parent
commit
aa100c8ab6

+ 2 - 2
plugin/show_user_info/index.php

@@ -1,9 +1,9 @@
 <?php
 // A user must be logged in.
-$_template['show_message']   = false;
+$_template['show_message'] = false;
 
 if (!api_is_anonymous()) {
-    $_template['show_message']   = true;
+    $_template['show_message'] = true;
 
     // Getting the current user id.
     $user_id = api_get_user_id();

+ 1 - 2
plugin/static/index.php

@@ -5,8 +5,7 @@ $content = $plugin->get_content();
 $title = $plugin->get_block_title();
 $title = $title ? "<h4>$title</h4>" : '';
 
-$css = $plugin->get_css();
-$css = $css ? "<style type=\"text/css\" scoped=\"scoped\">$css</style>" : '';
+$css = api_get_css('plugins/static/static.css');
 
 if (empty($content)) {
     echo '';

+ 4 - 4
plugin/static/resources/static.css → plugin/static/public/static.css

@@ -1,4 +1,4 @@
-
-.well.sidebar-nav.rss
-{
-}
+
+.well.sidebar-nav.rss
+{
+}

+ 302 - 0
web/plugins/buycourses/css/style.css

@@ -0,0 +1,302 @@
+.buy-courses-tabs {
+  margin-bottom: 15px;
+}
+
+.buy-courses-page-header {
+  padding-bottom: 9px;
+  margin: 40px 0 20px;
+  border-bottom: 1px solid #eee;
+}
+
+.buy-courses-block-button {
+  display: block;
+  width: 100%;
+  height: 50px;
+  line-height: 35px;
+  font-size: 16px;
+}
+
+.buy-courses-cross-out {
+  text-decoration:line-through;
+}
+
+.buy-courses-title-color {
+  color: #5DC3E1;
+  padding-bottom: 10px;
+}
+
+.buy-courses-description-service {
+  text-align: justify;
+  font-size: 18px;
+  line-height: 1.42857;
+}
+
+@-moz-keyframes wobblebar-loader {
+  0% {
+    left: 4px;
+  }
+  3% {
+    left: 204px;
+  }
+  6% {
+    left: 4px;
+  }
+  9% {
+    left: 204px;
+  }
+  12% {
+    left: 4px;
+  }
+  15% {
+    left: 204px;
+  }
+  18% {
+    left: 32px;
+  }
+  27% {
+    left: 32px;
+  }
+  30% {
+    left: 204px;
+  }
+  33% {
+    left: 4px;
+  }
+  36% {
+    left: 204px;
+  }
+  39% {
+    left: 4px;
+  }
+  42% {
+    left: 204px;
+  }
+  45% {
+    left: 4px;
+  }
+  48% {
+    left: 204px;
+  }
+  51% {
+    left: 152px;
+  }
+  63% {
+    left: 152px;
+  }
+  66% {
+    left: 4px;
+  }
+  69% {
+    left: 204px;
+  }
+  72% {
+    left: 4px;
+  }
+  75% {
+    left: 204px;
+  }
+  78% {
+    left: 4px;
+  }
+  81% {
+    left: 204px;
+  }
+  84% {
+    left: 72px;
+  }
+  94% {
+    left: 72px;
+  }
+  97% {
+    left: 204px;
+  }
+}
+@-webkit-keyframes wobblebar-loader {
+  0% {
+    left: 4px;
+  }
+  3% {
+    left: 204px;
+  }
+  6% {
+    left: 4px;
+  }
+  9% {
+    left: 204px;
+  }
+  12% {
+    left: 4px;
+  }
+  15% {
+    left: 204px;
+  }
+  18% {
+    left: 32px;
+  }
+  27% {
+    left: 32px;
+  }
+  30% {
+    left: 204px;
+  }
+  33% {
+    left: 4px;
+  }
+  36% {
+    left: 204px;
+  }
+  39% {
+    left: 4px;
+  }
+  42% {
+    left: 204px;
+  }
+  45% {
+    left: 4px;
+  }
+  48% {
+    left: 204px;
+  }
+  51% {
+    left: 152px;
+  }
+  63% {
+    left: 152px;
+  }
+  66% {
+    left: 4px;
+  }
+  69% {
+    left: 204px;
+  }
+  72% {
+    left: 4px;
+  }
+  75% {
+    left: 204px;
+  }
+  78% {
+    left: 4px;
+  }
+  81% {
+    left: 204px;
+  }
+  84% {
+    left: 72px;
+  }
+  94% {
+    left: 72px;
+  }
+  97% {
+    left: 204px;
+  }
+}
+@keyframes wobblebar-loader {
+  0% {
+    left: 4px;
+  }
+  3% {
+    left: 204px;
+  }
+  6% {
+    left: 4px;
+  }
+  9% {
+    left: 204px;
+  }
+  12% {
+    left: 4px;
+  }
+  15% {
+    left: 204px;
+  }
+  18% {
+    left: 32px;
+  }
+  27% {
+    left: 32px;
+  }
+  30% {
+    left: 204px;
+  }
+  33% {
+    left: 4px;
+  }
+  36% {
+    left: 204px;
+  }
+  39% {
+    left: 4px;
+  }
+  42% {
+    left: 204px;
+  }
+  45% {
+    left: 4px;
+  }
+  48% {
+    left: 204px;
+  }
+  51% {
+    left: 152px;
+  }
+  63% {
+    left: 152px;
+  }
+  66% {
+    left: 4px;
+  }
+  69% {
+    left: 204px;
+  }
+  72% {
+    left: 4px;
+  }
+  75% {
+    left: 204px;
+  }
+  78% {
+    left: 4px;
+  }
+  81% {
+    left: 204px;
+  }
+  84% {
+    left: 72px;
+  }
+  94% {
+    left: 72px;
+  }
+  97% {
+    left: 204px;
+  }
+}
+/* :not(:required) hides this rule from IE9 and below */
+.wobblebar-loader:not(:required) {
+  background: #2E6DA4;
+  -moz-border-radius: 10.66667px;
+  -webkit-border-radius: 10.66667px;
+  border-radius: 10.66667px;
+  display: inline-block;
+  overflow: hidden;
+  text-indent: -9999px;
+  width: 228px;
+  height: 21.33333px;
+  position: relative;
+}
+.wobblebar-loader:not(:required)::after {
+  -moz-animation: wobblebar-loader 15000ms infinite ease;
+  -webkit-animation: wobblebar-loader 15000ms infinite ease;
+  animation: wobblebar-loader 15000ms infinite ease;
+  background: white;
+  display: block;
+  -moz-border-radius: 7.11111px;
+  -webkit-border-radius: 7.11111px;
+  border-radius: 7.11111px;
+  content: '';
+  position: absolute;
+  top: 3.55556px;
+  left: 4px;
+  width: 21.33333px;
+  height: 14.22222px;
+}

BIN
web/plugins/buycourses/img/128/backlogs.png


BIN
web/plugins/buycourses/img/128/buycourses.png


BIN
web/plugins/buycourses/img/128/paymentsettings.png


BIN
web/plugins/buycourses/img/128/settings.png


BIN
web/plugins/buycourses/img/32/backlogs.png


BIN
web/plugins/buycourses/img/32/buycourses.png


BIN
web/plugins/buycourses/img/32/paymentsettings.png


BIN
web/plugins/buycourses/img/32/settings.png


BIN
web/plugins/buycourses/img/42/backlogs.png


BIN
web/plugins/buycourses/img/42/buycourses.png


BIN
web/plugins/buycourses/img/42/paymentsettings.png


BIN
web/plugins/buycourses/img/42/settings.png


BIN
web/plugins/buycourses/img/64/backlogs.png


BIN
web/plugins/buycourses/img/64/buycourses.png


BIN
web/plugins/buycourses/img/64/paymentsettings.png


BIN
web/plugins/buycourses/img/64/settings.png


+ 145 - 0
web/plugins/buycourses/js/commissions.js

@@ -0,0 +1,145 @@
+/* 
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+function showSliders(maxPercentage, type, defaultValues) {
+    
+    defaultValues = defaultValues || "0";
+    
+    var sliderCounter = 1;
+    var percentage = 0;
+    var minPercentage = 0;
+
+    $("#selectBox option:selected").each(function() {
+
+        var count = $("#selectBox option:selected").length;
+        
+        percentage = maxPercentage / count;
+        percentage = parseInt(percentage);
+
+        verifyMaxPercentage = percentage * count;
+        if (verifyMaxPercentage !== maxPercentage && sliderCounter === 1) {
+            percentage = percentage + (maxPercentage - verifyMaxPercentage);
+        }
+
+        beneficiaryId = $(this).val();
+        beneficiaryName = $(this).text();
+        
+        var verify;
+      
+        var slidersValue = defaultValues.toString().split(',');
+
+        if (type === 'default') {
+            
+            percentage = slidersValue[sliderCounter - 1];
+            percentage = parseInt(percentage);
+            $("#panelSliders").append("<span id=" + beneficiaryId + ">" + beneficiaryName + "</span> - [ <span class='value' >" + percentage + "</span> % ] <div class='panelSliders'></div>");
+
+        } else if (type === 'renew') {
+
+            $("#panelSliders").append("<span id=" + beneficiaryId + " >" + beneficiaryName + "</span> - [ <span class='value' >" + percentage + "</span> % ] <div class='panelSliders'></div>");
+            
+        }
+        
+        verifyPaypalAccountByBeneficiary(beneficiaryId);
+
+        sliderCounter++;
+        stepSlide = count - 1;
+        
+        if (stepSlide === 0) {
+            (type === 'default') ? minPercentage = 0 : minPercentage = 100;
+            (type === 'default') ? stepSlide = 100 : stepSlide = 1;
+        }
+
+        
+        $( "#panelSliders .panelSliders" ).slider({
+            value: percentage,
+            min: minPercentage,
+            max: maxPercentage,
+            step: stepSlide,
+            animate: true,
+            slide: function( event, ui ) {
+
+                $(this).prev(".value").text(ui.value);
+
+                var total = 0;
+                var sliders = $( "#panelSliders .panelSliders" );
+
+                sliders.not(this).each(function() {
+                    value = $(this).slider("option", "value");
+                    total += value;
+                });
+
+                total += ui.value;
+                var delta = 100 - total;
+
+                sliders.not(this).each(function() {
+                    
+                    var t = $(this);
+                    value = t.slider("option", "value");
+
+                    var newValue = value + (delta/stepSlide);
+
+                    if (newValue < 0 || ui.value == 100) 
+                        newValue = 0;
+                    if (newValue > 100) 
+                        newValue = 100;
+
+                    t.prev('.value').text(newValue);
+                    t.slider('value', newValue);
+                    
+                });
+                
+                $("[name=\'commissions\']").val(getSlidersValues());
+            }
+        });
+    });
+    
+    $("[name=\'commissions\']").val(getSlidersValues());
+    showCorrectSliderHandler();
+};
+
+function getSlidersValues() {
+    var commissions = "";
+    
+    $( "#panelSliders .panelSliders" ).each(function() {
+        commissions += $(this).prev(".value").text() + ',';
+    });
+    
+    commissions = commissions.substring(0, commissions.length-1);
+    
+    return commissions;
+}
+
+function showCorrectSliderHandler() {
+    var correctHandler = [];
+    
+    $("#panelSliders > span").each(function () {
+        if ($(this).hasClass('value')) {
+            correctHandler.push($(this).text());
+        }
+    });
+    
+    var counter = 0;
+    
+    $("#panelSliders .panelSliders > span").each(function () {
+        if ($(this).hasClass('ui-slider-handle')) {
+            $(this).css('left', correctHandler[counter]+'%');
+            counter++;
+        }
+    });
+}
+
+function verifyPaypalAccountByBeneficiary(userId) {
+    
+    return $.ajax({
+        data: 'id='+userId,
+        url: 'buycourses.ajax.php?a=verifyPaypal',
+        type: 'POST',
+        success: function(response) {
+            $("#"+userId).append(' '+response);
+        }
+    });
+}

BIN
web/plugins/rss/arrow-bullet.png


+ 41 - 0
web/plugins/rss/color.css

@@ -0,0 +1,41 @@
+
+.gfg-root a:link,
+.gfg-root a:visited,
+.gfg-root a:focus,
+.gfg-root a:active
+{
+    color: #CC0066;
+}
+
+.gfg-subtitle, .gfg-title{
+    background-color: #CC0066 !important;
+    color: #FFFFFF !important;
+}
+
+.gfg-subtitle > a{
+    color: #FFFFFF !important;
+}
+
+.gfg-subtitle > a:hover{
+    color: black !important;
+}
+
+.gfg-root a:hover, .gfg-subtitle:hover {
+    color: black;
+}
+
+.gfg-listentry-odd:hover{
+    background-color: #E9E9F0 !important;
+}
+
+.gfg-listentry-even:hover{
+    background-color: #E9E9F0 !important;
+}
+
+.gfg-horizontal-root .gfg-entry .gf-result, .gfg-horizontal-root .gfg-entry, .gfg-horizontal-root .gf-snippet{
+    background-color: white !important;
+}
+
+.gfg-horizontal-root .gfg-entry {
+    background-color: white !important;
+}

+ 102 - 0
web/plugins/rss/rss.css

@@ -0,0 +1,102 @@
+@import url(http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css);
+
+.well.sidebar-nav.rss
+{
+}
+
+/*google feeds*/
+
+.gfg-listentry-highlight,
+.gfg-listentry
+{
+    background-position: left center;
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+.gfg-root a:link,
+.gfg-root a:visited,
+.gfg-root a:focus,
+.gfg-root a:active
+{
+    font-weight: normal;
+    text-decoration: none;
+}
+
+.gfg-root {
+    border-left:0px;
+    border-right:0px;
+    border-top:0px ;
+}
+.gfg-listentry {
+    line-height: 14px !important;
+}
+
+.gfg-listentry{
+    white-space: normal;
+}
+
+.gfg-subtitle, .gfg-title{
+    font-weight: bold ;
+}
+
+.gfg-title{
+    display: none;
+}
+
+.gfg-subtitle a:link, .gfg-title a:link{
+    font-weight: bold;
+}
+
+.gfg-root .gfg-entry .gf-result .gf-title{
+    white-space: normal !important;
+}
+
+.gfg-entry{
+    height:9.5em !important;
+    /*    border: 1px solid grey;
+        border-radius: 8px 8px 8px 8px;
+        margin:2px;*/
+}
+
+.gfg-root, .gfg-entry, .gf-result, .gf-snippet{
+    background-color: transparent !important;
+}
+
+.gfg-root a:hover, .gfg-subtitle:hover {
+    text-decoration: none;
+}
+
+.gfg-listentry{
+    height: auto;
+    padding-top:4px;
+    padding-bottom: 4px;
+    border-bottom-style: dotted;
+    border-bottom-width: 1px;
+}
+
+.gfg-listentry-odd {
+    background-color: transparent !important;
+}
+
+.gf-author, .gf-relativePublishedDate, .gf-spacer{
+    display:none !important;
+}
+
+.gfg-horizontal-root .gfg-entry .gf-result .gf-snippet {
+    display: block;
+    clear:both;
+}
+
+.gfg-branding{
+    display:none;
+}
+
+.gfg-horizontal-root{
+    height: auto;
+    border:none;
+}
+
+.gfg-horizontal-container{
+    display:inline;
+}