_binary From 39d971ee3acf72486a18f5562c97030023d67e1c Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Tue, 9 Sep 2014 21:49:26 -0700
Subject: [PATCH 1/2] - Added New wiki button for "Add slide" - Added new icon
 for wikibtn-slide - Display slide btn only for data-page-type is set && is
 equal to presentation

---
 css/editor.css                                 |   8 +++++++-
 resources/wiki_button_images/wikibtn-slide.png | Bin 0 -> 7047 bytes
 scripts/wiki.js                                |   4 +++-
 views/elements/groupfeed_element.php           |   6 +++---
 views/elements/wiki_element.php                |   9 ++++++++-
 5 files changed, 21 insertions(+), 6 deletions(-)
 create mode 100755 resources/wiki_button_images/wikibtn-slide.png

diff --git a/css/editor.css b/css/editor.css
index 057d591..317238f 100755
--- a/css/editor.css
+++ b/css/editor.css
@@ -170,6 +170,11 @@
         ../resources/wiki_button_images/wikibtn-search-widget.png)
         no-repeat;
 }
+
+.wikibtn-slide
+{
+    background: url(../resources/wiki_button_images/wikibtn-slide.png) no-repeat;
+}
 .wikibtn-bold:hover,
 .wikibtn-bullets:hover,
 .wikibtn-heading:hover,
@@ -181,7 +186,8 @@
 .wikibtn-search-widget:hover,
 .wikibtn-strike:hover,
 .wikibtn-table:hover,
-.wikibtn-underline:hover
+.wikibtn-underline:hover,
+.wikibtn-slide:hover
 {
     background-position: 0 -36px;
 }
diff --git a/resources/wiki_button_images/wikibtn-slide.png b/resources/wiki_button_images/wikibtn-slide.png
new file mode 100755
index 0000000000000000000000000000000000000000..4412fb76502f2648cc276d27ef915dbf7adf53ba
GIT binary patch
diff --git a/scripts/wiki.js b/scripts/wiki.js
index 8fd249f..fa1d735 100755
--- a/scripts/wiki.js
+++ b/scripts/wiki.js
@@ -49,6 +49,7 @@
  * "wikibtn-heading"
  * "wikibtn-search"
  * "wikibtn-table"
+ * "wikibtn-slide"
  * }
  */
 /**
@@ -187,7 +188,8 @@ function getStandardButtonsObject()
         'wikibtn-hyperlink': ['[[', ']]'],
         'wikibtn-bullets': ['* ' + tl['wiki_js_bullet'] + ' \n'],
         'wikibtn-numbers': ['# ' + tl['wiki_js_enum'] + ' \n'],
-        'wikibtn-hr': ['---- \n']
+        'wikibtn-hr': ['---- \n'],
+        'wikibtn-slide': ['=Slide One Title here=\n* Add Text here \n* And here \n* Also here \n....\n']
     };
 }
 /**
diff --git a/views/elements/groupfeed_element.php b/views/elements/groupfeed_element.php
index 8ca0658..57280bc 100644
--- a/views/elements/groupfeed_element.php
+++ b/views/elements/groupfeed_element.php
@@ -449,7 +449,7 @@ class GroupfeedElement extends Element implements CrawlConstants
                     ?></label></b></h2>'+
                     '<textarea class="short-text-area" '+
                     'id="comment-'+ id +'" name="description" '+
-                    'data-buttons="all,!wikibtn-search,!wikibtn-heading" '+
+                    'data-buttons="all,!wikibtn-search,!wikibtn-heading,!wikibtn-slide" '+
                     '></textarea>' +
                     '<button class="button-box float-opposite" ' +
                     'type="submit"><?php e(tl("groupfeed_element_save"));
@@ -496,7 +496,7 @@ class GroupfeedElement extends Element implements CrawlConstants
                     ?></label></b></p>' +
                     '<textarea class="short-text-area" '+
                     'id="description-'+ id +'" name="description" '+
-                    'data-buttons="all,!wikibtn-search,!wikibtn-heading" '+
+                    'data-buttons="all,!wikibtn-search,!wikibtn-heading,!wikibtn-slide" '+
                     '></textarea>' +
                     '<button class="button-box float-opposite" ' +
                     'type="submit"><?php e(tl("groupfeed_element_save"));
@@ -543,7 +543,7 @@ class GroupfeedElement extends Element implements CrawlConstants
                     ?></label></b></p>' +
                     '<textarea class="short-text-area" '+
                     'id="description-'+ id +'" name="description" '+
-                    'data-buttons="all,!wikibtn-search,!wikibtn-heading" '+
+                    'data-buttons="all,!wikibtn-search,!wikibtn-heading,!wikibtn-slide" '+
                     '>' + description + '</textarea>'+
                     '<button class="button-box float-opposite" ' +
                     'type="submit"><?php e(tl("groupfeed_element_save"));
diff --git a/views/elements/wiki_element.php b/views/elements/wiki_element.php
index f7ba60f..b315898 100644
--- a/views/elements/wiki_element.php
+++ b/views/elements/wiki_element.php
@@ -319,7 +319,14 @@ class WikiElement extends Element implements CrawlConstants
             </div>
             <div id='page-container'><textarea id="wiki-page"
                 class="tall-text-area" name="page"
-                data-buttons='all' ><?php
+                <?php 
+                if((!isset($data['page_type']) || $data['page_type'] != 'presentation')){
+                    $dataButtons = 'all,!wikibtn-slide';
+                }else{
+                    $dataButtons = 'all';
+                }?>
+                data-buttons='<?php echo $dataButtons; ?>' >
+                    <?php
                 e($data['PAGE']);
             ?></textarea>
             <div class="green"><?php
-- 
1.8.5.2 (Apple Git-48)


From 4e849e0cd9f829ba2187c2ffdb909068cf3e18d2 Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Sat, 13 Sep 2014 01:08:46 -0700
Subject: [PATCH 2/2] refactoring variablename data_buttons & changed echo to
 e()

---
 views/elements/wiki_element.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/views/elements/wiki_element.php b/views/elements/wiki_element.php
index b315898..eed6a99 100644
--- a/views/elements/wiki_element.php
+++ b/views/elements/wiki_element.php
@@ -321,11 +321,11 @@ class WikiElement extends Element implements CrawlConstants
                 class="tall-text-area" name="page"
                 <?php 
                 if((!isset($data['page_type']) || $data['page_type'] != 'presentation')){
-                    $dataButtons = 'all,!wikibtn-slide';
+                    $data_buttons = 'all,!wikibtn-slide';
                 }else{
-                    $dataButtons = 'all';
+                    $data_buttons = 'all';
                 }?>
-                data-buttons='<?php echo $dataButtons; ?>' >
+                data-buttons='<?php e($data_buttons); ?>' >
                     <?php
                 e($data['PAGE']);
             ?></textarea>
-- 
1.8.5.2 (Apple Git-48)

