pushing changes for testing
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 20 Jun 2016 14:14:21 +0000 (10:14 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 20 Jun 2016 14:14:21 +0000 (10:14 -0400)
classes/glmPluginSupport.php
js/shortcodeBuilder.js

index 5a1ee35..020bdd9 100644 (file)
@@ -493,6 +493,7 @@ return; // Off for now ** Need to make this switchable in management
         foreach($addOnSlugs as $addOn){
             if ($this->config['addOns'][$addOn]['shortcodes']) {
                 $shortCodeList[] = $this->config['addOns'][$addOn]['shortcodes'];
+                
             }
         }
 
index 46b38ae..4f5f666 100644 (file)
@@ -6,7 +6,7 @@
 jQuery(document).ready(function ($) {
     
     'use strict';
-    
+
     var shortcodeDropdown, shortcodeCategory, blankStart, listBox, detailBox, target, boxTarget, shortcodeString,
     editor_shortcodes, category_id, shortcodeValues = {};
     
@@ -18,6 +18,15 @@ jQuery(document).ready(function ($) {
     $("#packageListAttr").hide();
     $(".scCategories").hide();
     
+//    tinyMCE.init({
+//      selector: "#tinymce-textarea",
+//      setup: function (editor) {
+//        editor.on('change', function (e) {
+//          var newVal = tinymce.get('tinymce-textarea').getContent();
+//          $('.text-mirror').html(newVal);
+//        });
+//      }
+//    });
     // reset checkboxes after page load
 //    function uncheckAll() {
 //      var w = document.getElementsByTagName('input');
@@ -27,8 +36,8 @@ jQuery(document).ready(function ($) {
 //        }
 //      }
 //    }
-    var shortcode = $("#shortcode_container").not('.glm-dynSelect-item'), clone, id_count;
-    id_count = 0;
+//    var shortcode = $("#shortcode_container").not('.glm-dynSelect-item'), clone, id_count;
+//    id_count = 0;
 //    $("#additionalShortcode").on( "click", function () {
 //            id_count++;
 //            clone = shortcode.clone(true);
@@ -113,13 +122,13 @@ jQuery(document).ready(function ($) {
         $("#showDetail").dialog().dialog("option", "width", 422);
     });
     
-//    var regExp = /\[([^)]+)\]/;
-    var regExp = /glm_members_list_/g;
+    var regExp = /\[([^)]+)\]/;
+//    var regExp = /glm_members_list_/g;
     function get_tinymce_content(){
         if (jQuery("#wp-content-wrap").hasClass("tmce-active")){
             
             tinyMCE.triggerSave();
-            
+
             if(regExp.exec($('#content').val())){
                 editorContent = regExp.exec($('#content').val());
                 return editorContent[0];
@@ -258,7 +267,7 @@ jQuery(document).ready(function ($) {
        } else if ( new_ids.length === 1) {
            id_string = new_ids[0];
        }
-
+        
        if($("#content").css("display") !== "none"){
            editor_content = content.val();
            if(empty_space){
@@ -271,9 +280,12 @@ jQuery(document).ready(function ($) {
        } else if(tinyMCE.activeEditor !== null){
            if(empty_space){
                 editor_content = tinyMCE.get('content').getContent({format: 'raw'});
+              
                 editor_content = editor_content.replace(ids, 'category="' + id_string + '"' );
                 tinyMCE.activeEditor.setContent(editor_content);
            } else {
+               var test = tinyMCE.get('glm-members-list_1').getContent();
+        console.debug(test);
                 editor_content = tinyMCE.get('content').getContent({format: 'raw'});
                 editor_content = editor_content.replace('category="' + ids, 'category="' + id_string);
                 tinyMCE.activeEditor.setContent(editor_content);