_binary From 06b4cfdeccd66bf38a674769b7d36ab4f1b95c08 Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Mon, 17 Nov 2014 15:10:49 -0800
Subject: [PATCH 1/6] Merge Top3 User requested 'enhancements' into master

Signed-off-by: epinapala <epinapala@ebay.com>
---
 css/search.css                           |   4 ++++
 locale/ar/configure.ini                  |   6 ++++++
 locale/bn/configure.ini                  |   3 +++
 locale/de/configure.ini                  |   3 +++
 locale/en-US/configure.ini               |   3 +++
 locale/es/configure.ini                  |   3 +++
 locale/fa/configure.ini                  |   3 +++
 locale/fr-FR/configure.ini               |   3 +++
 locale/he/configure.ini                  |   3 +++
 locale/hi/configure.ini                  |   3 +++
 locale/in-ID/configure.ini               |   3 +++
 locale/it/configure.ini                  |   3 +++
 locale/ja/configure.ini                  |   3 +++
 locale/kn/configure.ini                  |   3 +++
 locale/ko/configure.ini                  |   3 +++
 locale/pl/configure.ini                  |   3 +++
 locale/pt/configure.ini                  |   3 +++
 locale/ru/configure.ini                  |   3 +++
 locale/te/configure.ini                  |   3 +++
 locale/th/configure.ini                  |   3 +++
 locale/tr/configure.ini                  |   3 +++
 locale/vi-VN/configure.ini               |   3 +++
 resources/collapse.png                   | Bin 0 -> 1798 bytes
 resources/expand.png                     | Bin 0 -> 1712 bytes
 views/elements/groupfeed_element.php     |  36 +++++++++++++++++--------------
 views/elements/managegroups_element.php  |   4 +++-
 views/elements/managelocales_element.php |   6 ++++--
 views/elements/manageusers_element.php   |   4 +++-
 views/elements/wiki_element.php          |   6 +++---
 29 files changed, 103 insertions(+), 23 deletions(-)
 create mode 100644 resources/collapse.png
 create mode 100644 resources/expand.png

diff --git a/css/search.css b/css/search.css
index a0e8530..1b1946d 100755
--- a/css/search.css
+++ b/css/search.css
@@ -2899,3 +2899,7 @@ button.default{
 #help-close {
     color: #F5F5F5;
 }
+
+.sidebar {
+    top : 180px;
+}
\ No newline at end of file
diff --git a/locale/ar/configure.ini b/locale/ar/configure.ini
index c334626..28d6362 100755
--- a/locale/ar/configure.ini
+++ b/locale/ar/configure.ini
@@ -2267,6 +2267,12 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/bn/configure.ini b/locale/bn/configure.ini
index 75f8156..ba9c04c 100755
--- a/locale/bn/configure.ini
+++ b/locale/bn/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/de/configure.ini b/locale/de/configure.ini
index 7dfc463..d0cf9a6 100755
--- a/locale/de/configure.ini
+++ b/locale/de/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/en-US/configure.ini b/locale/en-US/configure.ini
index 72dcb79..f26ea8d 100755
--- a/locale/en-US/configure.ini
+++ b/locale/en-US/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = "Decline"
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = "Unsubscribe"
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = "Are you sure you want to Delete?"
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = "Delete"
 ;
diff --git a/locale/es/configure.ini b/locale/es/configure.ini
index 8b10037..eb086c6 100755
--- a/locale/es/configure.ini
+++ b/locale/es/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/fa/configure.ini b/locale/fa/configure.ini
index 254e5bd..4cc9815 100755
--- a/locale/fa/configure.ini
+++ b/locale/fa/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/fr-FR/configure.ini b/locale/fr-FR/configure.ini
index c7a0abf..7c723a6 100755
--- a/locale/fr-FR/configure.ini
+++ b/locale/fr-FR/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/he/configure.ini b/locale/he/configure.ini
index 0aeebcc..4286937 100755
--- a/locale/he/configure.ini
+++ b/locale/he/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/hi/configure.ini b/locale/hi/configure.ini
index 057ef95..ac86aaf 100755
--- a/locale/hi/configure.ini
+++ b/locale/hi/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/in-ID/configure.ini b/locale/in-ID/configure.ini
index 632e166..375aa44 100755
--- a/locale/in-ID/configure.ini
+++ b/locale/in-ID/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/it/configure.ini b/locale/it/configure.ini
index ba1f9a5..84c1a57 100755
--- a/locale/it/configure.ini
+++ b/locale/it/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/ja/configure.ini b/locale/ja/configure.ini
index 952b5ca..bd391b5 100755
--- a/locale/ja/configure.ini
+++ b/locale/ja/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/kn/configure.ini b/locale/kn/configure.ini
index 093001a..e071f0c 100755
--- a/locale/kn/configure.ini
+++ b/locale/kn/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/ko/configure.ini b/locale/ko/configure.ini
index 5410719..dcf3e65 100755
--- a/locale/ko/configure.ini
+++ b/locale/ko/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/pl/configure.ini b/locale/pl/configure.ini
index 91f6c6a..9a60245 100755
--- a/locale/pl/configure.ini
+++ b/locale/pl/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/pt/configure.ini b/locale/pt/configure.ini
index 8d1b54f..9529117 100755
--- a/locale/pt/configure.ini
+++ b/locale/pt/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/ru/configure.ini b/locale/ru/configure.ini
index 7a8089c..7c3b71a 100755
--- a/locale/ru/configure.ini
+++ b/locale/ru/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/te/configure.ini b/locale/te/configure.ini
index 96adbda..30d94e3 100755
--- a/locale/te/configure.ini
+++ b/locale/te/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/th/configure.ini b/locale/th/configure.ini
index fb53e29..d5efab9 100755
--- a/locale/th/configure.ini
+++ b/locale/th/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/tr/configure.ini b/locale/tr/configure.ini
index fd9d2bb..0f7222f 100755
--- a/locale/tr/configure.ini
+++ b/locale/tr/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/locale/vi-VN/configure.ini b/locale/vi-VN/configure.ini
index deabc45..4dc7609 100755
--- a/locale/vi-VN/configure.ini
+++ b/locale/vi-VN/configure.ini
@@ -2267,6 +2267,9 @@ managegroups_element_decline = ""
 ; managegroups_element.php line: 255
 managegroups_element_unsubscribe = ""
 ;
+; managegroups_element.php line: 260
+confirm_delete_operation = ""
+;
 ; managegroups_element.php line: 261
 managegroups_element_delete = ""
 ;
diff --git a/resources/collapse.png b/resources/collapse.png
new file mode 100644
index 0000000000000000000000000000000000000000..f1a71597ed7519ecbd41b36c290cfd6d39c42abf
GIT binary patch
diff --git a/resources/expand.png b/resources/expand.png
new file mode 100644
index 0000000000000000000000000000000000000000..830be4190131420c7e4b945955c0763afc2060aa
GIT binary patch
diff --git a/views/elements/groupfeed_element.php b/views/elements/groupfeed_element.php
index a5695ae..9ab58e5 100644
--- a/views/elements/groupfeed_element.php
+++ b/views/elements/groupfeed_element.php
@@ -55,7 +55,7 @@ class GroupfeedElement extends Element implements CrawlConstants
         $logged_in = isset($data["ADMIN"]) && $data["ADMIN"];
         $append_url = ($logged_in) ?"&amp;".CSRF_TOKEN."=".
             $data[CSRF_TOKEN] : "";
-        $arrows = ($is_admin) ? "&lt;&lt;" : "&gt;&gt;";
+        $arrows = ($is_admin) ? "expand.png" : "collapse.png";
         $is_status = isset($data['STATUS']);
         $base_query = $data['PAGING_QUERY'] . $append_url;
         if(isset($data["WIKI_QUERY"])) {
@@ -81,13 +81,14 @@ class GroupfeedElement extends Element implements CrawlConstants
                         . $data['JUST_GROUP_ID'];
                 }
                 ?>
-                <div class="float-same admin-collapse">[<a
+                <div class="float-same admin-collapse sidebar"><a
                 href="<?php e($other_paging_query);
                 if(isset($data['MODE']) && $data['MODE'] == 'grouped'){
                     e("&amp;v=grouped");
                 }
                 ?>" ><?php
-                e($arrows); ?></a>]<?php
+                e("<img src='resources/" . $arrows . "'/>"); ?></a></div>
+                <div class="float-same admin-collapse"><?php
                 if(isset($data['SUBSCRIBE_LINK'])) {
                     if($data['SUBSCRIBE_LINK'] == PUBLIC_JOIN) {
                         e('[<a href="'.$paging_query.'&amp;arg=addgroup">'.
@@ -379,11 +380,22 @@ class GroupfeedElement extends Element implements CrawlConstants
                     }
                 }
                 ?>.
-            <a class="gray-link" rel='nofollow' href="<?php e($base_query.
+                <?php e("<span class='gray'> - $pub_date</span>");
+                ?>
+            <b><a class="gray-link" rel='nofollow' href="<?php e($base_query.
                 "&amp;just_group_id=".$page['GROUP_ID']);?>" ><?php
-                e($page[self::SOURCE_NAME]."</a>"
-                ."<span class='gray'> - $pub_date</span>");
-             ?></h2>
+                e($page[self::SOURCE_NAME]."</a></b>");
+                if(!isset($data['JUST_GROUP_ID']) &&
+                        in_array($page["MEMBER_ACCESS"], array(GROUP_READ_WRITE,
+                        GROUP_READ_WIKI)) ) {
+                    ?>
+                    (<a  class='gray-link' href='javascript:start_thread_form
+                    (<?php
+                        e("{$page['ID']},".
+                            "{$page['GROUP_ID']}"); ?>)'><?php
+                            e(tl('groupfeed_element_start_thread'));?></a>)
+                    <?php } ?>
+                </a></h2>
             <?php
             if(!isset($data['JUST_GROUP_ID'])) {
                 $description = isset($page[self::DESCRIPTION]) ?
@@ -446,14 +458,6 @@ class GroupfeedElement extends Element implements CrawlConstants
                     e("{$page['ID']}, {$page['PARENT_ID']}, ".
                         "{$page['GROUP_ID']}"); ?>)'><?php
                     e(tl('groupfeed_element_comment'));?></a>.<?php
-                    if(!isset($data['JUST_GROUP_ID']) &&
-                        in_array($page["MEMBER_ACCESS"], array(GROUP_READ_WRITE,
-                        GROUP_READ_WIKI)) ) {
-                        ?><a href='javascript:start_thread_form(<?php
-                        e("{$page['ID']},". "{$page['GROUP_ID']}"); ?>)'><?php
-                        e(tl('groupfeed_element_start_thread'));?></a>.
-                        <?php
-                    }
                 }
                 ?>
             </div>
@@ -674,4 +678,4 @@ class GroupfeedElement extends Element implements CrawlConstants
         <?php
     }
 }
-?>
+?>
\ No newline at end of file
diff --git a/views/elements/managegroups_element.php b/views/elements/managegroups_element.php
index ec88481..ce5fe64 100755
--- a/views/elements/managegroups_element.php
+++ b/views/elements/managegroups_element.php
@@ -257,7 +257,9 @@ class ManagegroupsElement extends Element
                             }
                         ?></a></td><?php
                     }  else {?>
-                        <a href="<?php e($delete_url . 'group_id='.
+                        <a onclick='javascript:return confirm("<?php
+                        e(tl('confirm_delete_operation')); ?>");'
+                        href="<?php e($delete_url . 'group_id='.
                         $group['GROUP_ID']); ?>"><?php
                         e(tl('managegroups_element_delete'));
                     }?></a></td>
diff --git a/views/elements/managelocales_element.php b/views/elements/managelocales_element.php
index 91aec8b..0f345b1 100644
--- a/views/elements/managelocales_element.php
+++ b/views/elements/managelocales_element.php
@@ -108,8 +108,10 @@ class ManagelocalesElement extends Element
                 .tl('managelocales_element_edit')."</a></td>");
             e("<td><a href='$base_url"
                 ."&amp;arg=deletelocale&amp;selectlocale=".
-                $locale['LOCALE_TAG']."' >"
-                .tl('managelocales_element_delete')."</a></td></tr>");
+                $locale['LOCALE_TAG']."' ");?>
+                onclick='javascript:return confirm("<?php
+            e(tl('confirm_delete_operation')); ?>");'><?php
+            e(tl('managelocales_element_delete')."</a></td></tr>");
         }
         ?>
         </table>
diff --git a/views/elements/manageusers_element.php b/views/elements/manageusers_element.php
index e909261..bb7025b 100644
--- a/views/elements/manageusers_element.php
+++ b/views/elements/manageusers_element.php
@@ -150,7 +150,9 @@ class ManageusersElement extends Element
                             tl('manageusers_element_delete').'</span>');
                     } else {
                     ?>
-                        <a href="<?php e($delete_url . 'user_name='.
+                        <a onclick='javascript:return confirm("<?php
+                        e(tl('confirm_delete_operation')); ?>");'
+                        href="<?php e($delete_url . 'user_name='.
                         $user['USER_NAME']); ?>"><?php
                         e(tl('manageusers_element_delete'));
                     }?></a></td>
diff --git a/views/elements/wiki_element.php b/views/elements/wiki_element.php
index 7eb7c71..78fbe92 100644
--- a/views/elements/wiki_element.php
+++ b/views/elements/wiki_element.php
@@ -57,7 +57,7 @@ class WikiElement extends Element implements CrawlConstants
         $logged_in = isset($data["ADMIN"]) && $data["ADMIN"];
         $can_edit = $logged_in && isset($data["CAN_EDIT"]) && $data["CAN_EDIT"];
         $is_admin = ($data["CONTROLLER"] == "admin");
-        $arrows = ($is_admin) ? "&lt;&lt;" : "&gt;&gt;";
+        $arrows = ($is_admin) ? "expand.png" : "collapse.png";
         $other_controller = ($is_admin) ? "group" : "admin";
         $base_query = "?c={$data['CONTROLLER']}";
         $csrf_token = "";
@@ -78,7 +78,7 @@ class WikiElement extends Element implements CrawlConstants
         }
         if(($is_admin || $logged_in) && (!isset($data['page_type']) ||
             $data['page_type'] != 'presentation')) { ?>
-            <div class="float-same admin-collapse">[<a id='arrows-link'
+            <div class="float-same admin-collapse sidebar"><a id='arrows-link'
             href="<?php e($other_base_query) ?>" onclick="
             arrows=elt('arrows-link');
             arrows_url = arrows.href;
@@ -89,7 +89,7 @@ class WikiElement extends Element implements CrawlConstants
             arrows_url += '&amp;caret=' + caret + '&amp;scroll_top=' +
                 edit_scroll;
             arrows.href = arrows_url;" ><?php
-            e($arrows); ?></a>]</div>
+            e("<img src='resources/" . $arrows . "'/>"); ?></a></div>
         <?php
         }
         ?>
-- 
2.1.2


From d8821fa21a715c7f7b70993b12a7df5cdcaf3f10 Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Mon, 17 Nov 2014 21:19:08 -0800
Subject: [PATCH 2/6] * Added Left/right/center align buttons for wiki editor.
 * Fixes an issue with aligned text div wrapping out of help-frame. * added
 display_type to toggleDisplay, use "block" display_type by default. * Fixes
 color for close on mobile to match with web. * Add align-center.

Signed-off-by: epinapala <epinapala@ebay.com>
---
 controllers/components/social_component.php        |   3 +++
 css/editor.css                                     |  20 +++++++++++++++++++-
 css/search.css                                     |   5 +++++
 locale/ar/configure.ini                            |   9 +++++++++
 locale/bn/configure.ini                            |   9 +++++++++
 locale/de/configure.ini                            |   9 +++++++++
 locale/en-US/configure.ini                         |   9 +++++++++
 locale/es/configure.ini                            |   9 +++++++++
 locale/fa/configure.ini                            |   9 +++++++++
 locale/fr-FR/configure.ini                         |   9 +++++++++
 locale/he/configure.ini                            |   9 +++++++++
 locale/hi/configure.ini                            |   9 +++++++++
 locale/in-ID/configure.ini                         |   9 +++++++++
 locale/it/configure.ini                            |   9 +++++++++
 locale/ja/configure.ini                            |   9 +++++++++
 locale/kn/configure.ini                            |   9 +++++++++
 locale/ko/configure.ini                            |   9 +++++++++
 locale/pl/configure.ini                            |   9 +++++++++
 locale/pt/configure.ini                            |   9 +++++++++
 locale/ru/configure.ini                            |   9 +++++++++
 locale/te/configure.ini                            |   9 +++++++++
 locale/th/configure.ini                            |   9 +++++++++
 locale/tr/configure.ini                            |   9 +++++++++
 locale/vi-VN/configure.ini                         |   9 +++++++++
 locale/zh-CN/configure.ini                         |   9 +++++++++
 .../wiki_button_images/wikibtn-centeraligned.png   | Bin 0 -> 7366 bytes
 .../wiki_button_images/wikibtn-leftaligned.png     | Bin 0 -> 7326 bytes
 .../wiki_button_images/wikibtn-rightaligned.png    | Bin 0 -> 7361 bytes
 scripts/basic.js                                   |   9 ++++++---
 scripts/help.js                                    |  21 +++++++++++++++------
 scripts/wiki.js                                    |   5 ++++-
 views/elements/help_element.php                    |   2 +-
 32 files changed, 251 insertions(+), 12 deletions(-)
 create mode 100644 resources/wiki_button_images/wikibtn-centeraligned.png
 create mode 100644 resources/wiki_button_images/wikibtn-leftaligned.png
 create mode 100644 resources/wiki_button_images/wikibtn-rightaligned.png

diff --git a/controllers/components/social_component.php b/controllers/components/social_component.php
index f9183ec..2453c79 100644
--- a/controllers/components/social_component.php
+++ b/controllers/components/social_component.php
@@ -1938,6 +1938,9 @@ EOD;
                 'wiki_js_link_text :"'. tl('wiki_js_link_text').'",'.
                 'wiki_js_link_url :"'. tl('wiki_js_link_url').'",'.
                 'wiki_js_placeholder :"'. tl('wiki_js_placeholder').'",'.
+                'wiki_js_centeraligned :"'. tl('wiki_js_centeraligned').'",'.
+                'wiki_js_rightaligned :"'. tl('wiki_js_rightaligned').'",'.
+                'wiki_js_leftaligned :"'. tl('wiki_js_leftaligned').'",'.
                 'wiki_js_definitionlist_item :"'.
                 tl('wiki_js_definitionlist_item').'",'.
                 'wiki_js_definitionlist_definition :"'.
diff --git a/css/editor.css b/css/editor.css
index d785bc2..e71fe42 100755
--- a/css/editor.css
+++ b/css/editor.css
@@ -179,6 +179,21 @@
     background: url(../resources/wiki_button_images/wikibtn-definitionlist.png)
     no-repeat;
 }
+.wikibtn-centeraligned
+{
+    background: url(../resources/wiki_button_images/wikibtn-centeraligned.png)
+    no-repeat;
+}
+.wikibtn-rightaligned
+{
+    background: url(../resources/wiki_button_images/wikibtn-rightaligned.png)
+    no-repeat;
+}
+.wikibtn-leftaligned
+{
+    background: url(../resources/wiki_button_images/wikibtn-leftaligned.png)
+    no-repeat;
+}
 .wikibtn-bold:hover,
 .wikibtn-bullets:hover,
 .wikibtn-heading:hover,
@@ -192,7 +207,10 @@
 .wikibtn-table:hover,
 .wikibtn-underline:hover,
 .wikibtn-slide:hover,
-.wikibtn-definitionlist:hover
+.wikibtn-definitionlist:hover,
+.wikibtn-rightaligned:hover,
+.wikibtn-leftaligned:hover,
+.wikibtn-centeraligned:hover
 {
     background-position: 0 -36px;
 }
diff --git a/css/search.css b/css/search.css
index 1b1946d..5c5f2f6 100755
--- a/css/search.css
+++ b/css/search.css
@@ -206,6 +206,11 @@ span.indent5
     text-align: left;
 }
 
+.align-center
+{
+    text-align: center;
+}
+
 .blockquote
 {
     margin-left: 0.3in;
diff --git a/locale/ar/configure.ini b/locale/ar/configure.ini
index 28d6362..680832c 100755
--- a/locale/ar/configure.ini
+++ b/locale/ar/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "حدد تتبع الارتباطات"
 ;
diff --git a/locale/bn/configure.ini b/locale/bn/configure.ini
index ba9c04c..5985acb 100755
--- a/locale/bn/configure.ini
+++ b/locale/bn/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/de/configure.ini b/locale/de/configure.ini
index d0cf9a6..c06a29d 100755
--- a/locale/de/configure.ini
+++ b/locale/de/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/en-US/configure.ini b/locale/en-US/configure.ini
index f26ea8d..f7b5851 100755
--- a/locale/en-US/configure.ini
+++ b/locale/en-US/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = "Title"
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = "Slide Item"
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = "This text is centered."
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = "This text is right-aligned."
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = "This text is left-aligned."
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "Select Crawl"
 ;
diff --git a/locale/es/configure.ini b/locale/es/configure.ini
index eb086c6..3e45d8a 100755
--- a/locale/es/configure.ini
+++ b/locale/es/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "Seleccionar Rastreo"
 ;
diff --git a/locale/fa/configure.ini b/locale/fa/configure.ini
index 4cc9815..dae5f83 100755
--- a/locale/fa/configure.ini
+++ b/locale/fa/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "یک خزش انتخاب کنید"
 ;
diff --git a/locale/fr-FR/configure.ini b/locale/fr-FR/configure.ini
index 7c723a6..3219aef 100755
--- a/locale/fr-FR/configure.ini
+++ b/locale/fr-FR/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/he/configure.ini b/locale/he/configure.ini
index 4286937..10494a4 100755
--- a/locale/he/configure.ini
+++ b/locale/he/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/hi/configure.ini b/locale/hi/configure.ini
index ac86aaf..2a79c40 100755
--- a/locale/hi/configure.ini
+++ b/locale/hi/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/in-ID/configure.ini b/locale/in-ID/configure.ini
index 375aa44..25db435 100755
--- a/locale/in-ID/configure.ini
+++ b/locale/in-ID/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/it/configure.ini b/locale/it/configure.ini
index 84c1a57..14aada3 100755
--- a/locale/it/configure.ini
+++ b/locale/it/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "Seleziona Scansione"
 ;
diff --git a/locale/ja/configure.ini b/locale/ja/configure.ini
index bd391b5..76bdb5a 100755
--- a/locale/ja/configure.ini
+++ b/locale/ja/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/kn/configure.ini b/locale/kn/configure.ini
index e071f0c..3f8c999 100755
--- a/locale/kn/configure.ini
+++ b/locale/kn/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "ಕ್ರಾವ್ಲನ್ನು ಆಯ್ಕೆ ಮಾಡಿ"
 ;
diff --git a/locale/ko/configure.ini b/locale/ko/configure.ini
index dcf3e65..ca60683 100755
--- a/locale/ko/configure.ini
+++ b/locale/ko/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/pl/configure.ini b/locale/pl/configure.ini
index 9a60245..8cba694 100755
--- a/locale/pl/configure.ini
+++ b/locale/pl/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/pt/configure.ini b/locale/pt/configure.ini
index 9529117..a13ac09 100755
--- a/locale/pt/configure.ini
+++ b/locale/pt/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/ru/configure.ini b/locale/ru/configure.ini
index 7c3b71a..d71da01 100755
--- a/locale/ru/configure.ini
+++ b/locale/ru/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/te/configure.ini b/locale/te/configure.ini
index 30d94e3..d2e9a1d 100755
--- a/locale/te/configure.ini
+++ b/locale/te/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "క్రాల్ ఎంచుకోండి"
 ;
diff --git a/locale/th/configure.ini b/locale/th/configure.ini
index d5efab9..2723bdc 100755
--- a/locale/th/configure.ini
+++ b/locale/th/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/tr/configure.ini b/locale/tr/configure.ini
index 0f7222f..c425211 100755
--- a/locale/tr/configure.ini
+++ b/locale/tr/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = ""
 ;
diff --git a/locale/vi-VN/configure.ini b/locale/vi-VN/configure.ini
index 4dc7609..da6c5c7 100755
--- a/locale/vi-VN/configure.ini
+++ b/locale/vi-VN/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "Chọn thu thập th&ocirc;ng tin"
 ;
diff --git a/locale/zh-CN/configure.ini b/locale/zh-CN/configure.ini
index 2d087c0..277102e 100755
--- a/locale/zh-CN/configure.ini
+++ b/locale/zh-CN/configure.ini
@@ -966,6 +966,15 @@ wiki_js_slide_sample_title = ""
 ; social_component.php line: 1910
 wiki_js_slide_sample_bullet = ""
 ;
+; social_component.php line: 1941
+wiki_js_centeraligned = ""
+;
+; social_component.php line: 1942
+wiki_js_rightaligned = ""
+;
+; social_component.php line: 1943
+wiki_js_leftaligned = ""
+;
 ; social_component.php line: 1950
 social_component_select_crawl = "搜尋選擇"
 ;
diff --git a/resources/wiki_button_images/wikibtn-centeraligned.png b/resources/wiki_button_images/wikibtn-centeraligned.png
new file mode 100644
index 0000000000000000000000000000000000000000..4d5ee5c00dcb0958f0fb032f6348d93858d1c175
GIT binary patch
diff --git a/resources/wiki_button_images/wikibtn-leftaligned.png b/resources/wiki_button_images/wikibtn-leftaligned.png
new file mode 100644
index 0000000000000000000000000000000000000000..c55ad3213882397cc5a2c183e0dcf6c58d9916a9
GIT binary patch
diff --git a/resources/wiki_button_images/wikibtn-rightaligned.png b/resources/wiki_button_images/wikibtn-rightaligned.png
new file mode 100644
index 0000000000000000000000000000000000000000..fff23671438e776021f41a98c0de019c289fec15
GIT binary patch
diff --git a/scripts/basic.js b/scripts/basic.js
index a886a2a..57905f2 100755
--- a/scripts/basic.js
+++ b/scripts/basic.js
@@ -175,13 +175,16 @@ function setDisplay(id, value, display_type)
  * Toggles an element between display:none and display block
  * @param String id  the id of the DOM element one wants
  */
-function toggleDisplay(id)
+function toggleDisplay(id, display_type)
 {
+    if(display_type === undefined){
+        display_type = "block";
+    }
     obj = elt(id);
-    if(obj.style.display == "block")  {
+    if(obj.style.display == display_type)  {
         value = "none";
     } else {
-        value = "block";
+        value = display_type;
     }
     obj.style.display = value;
 }
diff --git a/scripts/help.js b/scripts/help.js
index ec56775..5d63b5f 100644
--- a/scripts/help.js
+++ b/scripts/help.js
@@ -51,14 +51,14 @@ function toggleHelp(id, isMobile, target_controller)
     }
     obj = elt(id);
     if (isMobile === false) {
-        toggleDisplay(id);
+        toggleDisplay(id,"inline-block");
         var new_width;
         var decrease_width_by = Math.floor(getCssProperty(obj, 'width') / 3);
         //Calculate pixel to inch. clientWidth only returns in pixels.
         if (obj.style.display === "none") {
             new_width = Math.floor(getCssProperty(help_node, 'width')) +
             decrease_width_by;
-        } else if (obj.style.display === "block") {
+        } else {
             new_width = Math.floor(getCssProperty(help_node, 'width')) -
             decrease_width_by;
         }
@@ -66,14 +66,15 @@ function toggleHelp(id, isMobile, target_controller)
             help_node.style.maxWidth = new_width + "px";
         }
     } else {
-        toggleDisplay(id);
-        var height_after_toggle = (obj.clientHeight);
+        toggleDisplay(id,"inline-block");
+        var height_after_toggle = (elt("mobile-help").clientHeight);
         //Calculate pixel to inch. clientWidth only returns in pixels.
         if (obj.style.display === "none") {
             //on closing, restore top
             help_node.style.top = current_activity_top + "px";
             current_activity_closed = true;
-        } else if (obj.style.display === "block") {
+        } else {
+            //setDisplay("help-frame",true,"inline-block");
             help_node.style.top = current_activity_top +
             height_after_toggle + "px";
             /* The div.clientHeight doesnt include the height
@@ -211,6 +212,14 @@ function parseWikiContent(wiki_text, group_id, page_id, controller_name,
             : page_name)
         + '</a>';
     });
+    //Parse right/left/center justified text. Does a literal word match, instead
+    //of (.+?).
+    html = html.replace(/{{(left|right|center)\|(.+?)}}/g, function (match,
+        contents, desc)
+    {
+        return '<div class="align-' + contents + '"><div>' + desc
+        + '</div></div>';
+    });
     return html;
 }
 /*
@@ -278,7 +287,7 @@ function displayHelpForId(help_point, is_mobile, target_controller,
     current_action, csrf_token_key, csrf_token_value, help_group_id,
     api_controller, api_action, mode)
 {
-    if((elt("help-frame").style.display) === "block") {
+    if((elt("help-frame").style.display) === "inline-block") {
         toggleHelp('help-frame', is_mobile, target_controller);
     }
     var tl = eval('(' + help_point.getAttribute("data-tl") + ')');
diff --git a/scripts/wiki.js b/scripts/wiki.js
index 6b3de35..d4d25c6 100755
--- a/scripts/wiki.js
+++ b/scripts/wiki.js
@@ -206,7 +206,10 @@ function getStandardButtonsObject()
             + '; ' + tl['wiki_js_definitionlist_item']
             + ' : ' + tl['wiki_js_definitionlist_definition']
             + '' + '\n'],
-        'wikibtn-hr': ['---- \n'],
+        'wikibtn-leftaligned': ['{{left|','}}'],
+        'wikibtn-centeraligned': ['{{center|','}}'],
+        'wikibtn-rightaligned': ['{{right|','}}'],
+        'wikibtn-hr': ['---- \n']
     };
 }
 /*
diff --git a/views/elements/help_element.php b/views/elements/help_element.php
index f1768b4..dd2a750 100644
--- a/views/elements/help_element.php
+++ b/views/elements/help_element.php
@@ -57,7 +57,7 @@ class HelpElement extends Element
             ?>
             <div id="mobile-help">
                 <div id="help-frame" class="frame help-pane">
-                    <div class="float-opposite">
+                    <div  id="help-close" class="float-opposite">
                         [<a class="close" onclick="toggleHelp('help-frame',
                             true,'<?php e($_REQUEST['c']);?>');return
                             false; ">X
-- 
2.1.2


From b7685c18f43a68383ae34e3c68f2dc0ea80b4d1f Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Tue, 18 Nov 2014 13:53:45 -0800
Subject: [PATCH 3/6] - Added YioopPhantomRunner, PhantomUItests, JS Tests

Signed-off-by: epinapala <epinapala@ebay.com>
---
 tests/YioopPhantomRunner.php |  72 +++++++++++++
 tests/mobile_ui_tests.js     | 235 +++++++++++++++++++++++++++++++++++++++++++
 tests/phantom.php            |  46 +++++++++
 tests/phantomjs_ui_test.php  | 127 +++++++++++++++++++++++
 tests/web_ui_tests.js        | 189 ++++++++++++++++++++++++++++++++++
 5 files changed, 669 insertions(+)
 create mode 100644 tests/YioopPhantomRunner.php
 create mode 100644 tests/mobile_ui_tests.js
 create mode 100644 tests/phantom.php
 create mode 100644 tests/phantomjs_ui_test.php
 create mode 100644 tests/web_ui_tests.js

diff --git a/tests/YioopPhantomRunner.php b/tests/YioopPhantomRunner.php
new file mode 100644
index 0000000..40347c9
--- /dev/null
+++ b/tests/YioopPhantomRunner.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * SeekQuarry/Yioop --
+ * Open Source Pure PHP Search Engine, Crawler, and Indexer
+ * Copyright (C) 2009 - 2014  Chris Pollett chris@pollett.org
+ * LICENSE:
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * END LICENSE
+ *
+ * @author Eswara Rajesh Pinapala epinapala@live.com
+ * @package seek_quarry
+ * @subpackage test
+ * @license http://www.gnu.org/licenses/ GPL3
+ * @link http://www.seekquarry.com/
+ * @copyright 2009 - 2014
+ * @filesource
+ */
+/**
+ * Used to run PhantomJs scripts from the command line.
+ *
+ * @author Eswara Rajesh Pinapala
+ * @package seek_quarry
+ * @subpackage test
+ */
+class YioopPhantomRunner
+{
+    private $phantomjs_bin_path = 'phantomjs';
+    public function __construct($bin_path = null)
+    {
+        if($bin_path !== null) {
+            $this->phantomjs_bin_path = $bin_path;
+        }
+        $version = $this->execute("-v");
+        if(!$version){
+            die("PhantomJS Not found, Skipping UI Tests");
+        }
+    }
+    public function execute($script, $decode_json = false)
+    {
+        $shell_result = shell_exec(
+            escapeshellcmd("{$this->phantomjs_bin_path} " . implode(' ',
+                    func_get_args())));
+        if($shell_result === null) {
+            return false;
+        }
+        if($decode_json) {
+            if(substr($shell_result, 0, 1) !== '{') {
+                //return if the result is not a JSON.
+                return $shell_result;
+            } else {
+                //If the result is a JSON, decode JSON into a PHP array.
+                $json = json_decode($shell_result, true);
+                if($json === null) {
+                    return false;
+                }
+                return $json;
+            }
+        } else {
+            return $shell_result;
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/tests/mobile_ui_tests.js b/tests/mobile_ui_tests.js
new file mode 100644
index 0000000..754317d
--- /dev/null
+++ b/tests/mobile_ui_tests.js
@@ -0,0 +1,235 @@
+var page = require('webpage').create(),
+    testindex = 0,
+    loadInProgress = false,
+    fs = require('fs'),
+    path = 'results.json',
+    results = {},
+    system = require('system'),
+    args = system.args,
+    DEBUG = false,
+    page_url = args[1];
+
+if (args[2] === "true") {
+    DEBUG = true;
+}
+
+/**
+ * set viewport for debugging using slimerjs.
+ */
+page.viewportSize = {
+    width: 1440,
+    height: 768
+};
+
+page.settings.userAgent = 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
+
+/**
+ * Helper Functions
+ */
+function l(msg) {
+    !DEBUG || console.log("[Debug] : " + msg);
+}
+
+function functionName(fun) {
+    var ret = fun.toString();
+    ret = ret.substr('function '.length);
+    ret = ret.substr(0, ret.indexOf('('));
+    return ret;
+}
+
+function writeToFile(filename, contents) {
+    try {
+        fs.write(filename, contents, 'w');
+    } catch (e) {
+        console.log(e);
+    }
+}
+
+function renderTestResults() {
+    console.log(JSON.stringify(results));
+    //writeToFile(path,JSON.stringify(results));
+}
+
+/**
+ * PhantomJs Tests setup.
+ **/
+page.onConsoleMessage = function(msg) {
+    console.log(msg);
+};
+
+page.onLoadStarted = function() {
+    loadInProgress = true;
+};
+
+page.onLoadFinished = function() {
+    loadInProgress = false;
+};
+
+page.click = function(selector) {
+    l("Clicking Element[ " + selector + "]");
+    this.evaluate(function(selector, l) {
+        var e = document.createEvent("MouseEvents");
+        e.initEvent("click", true, true);
+        document.querySelector(selector).dispatchEvent(e);
+    }, selector, l);
+};
+
+page.assertExists = function(selector, message) {
+    var res = {};
+    res.msg = message;
+    res.elm = null;
+
+    res.elm = this.evaluate(function(selector) {
+        return document.querySelector(selector);
+    }, selector);
+
+    if (res.elm) {
+        res.status = "PASS";
+        res.ack = true;
+    } else {
+        res.status = "FAIL";
+        res.ack = false;
+    }
+
+    return res;
+};
+page.assertExistsByX = function(selector, message) {
+    var res = {};
+    res.msg = message;
+    res.elm = null;
+
+    res.elm = this.evaluate(function(selector) {
+        return document.evaluate(
+            selector,
+            document,
+            null,
+            XPathResult.ORDERED_NODE_ITERATOR_TYPE,
+            null);
+
+    }, selector);
+
+    if (res.elm) {
+        res.status = "PASS";
+        res.ack = true;
+    } else {
+        res.status = "FAIL";
+        res.ack = false;
+    }
+
+    return res;
+};
+
+
+var steps = [
+
+    function testHomePage() {
+        page.open(page_url, function() {
+            return true;
+        });
+    },
+    function testSignInLink() {
+        var result = page.assertExists('body > div.landing-top-bar > div.user-nav > ul > li:nth-child(2) > a', "Signin link exists", page);
+        if (result.ack) {
+            page.evaluate(function() {
+                var ev = document.createEvent("MouseEvents");
+                ev.initEvent("click", true, true);
+                document.querySelector("a[href='./?c=admin']").dispatchEvent(ev);
+            });
+
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testLoginFormExists() {
+        var result = page.assertExists('body > div.landing.non-search > form', "Login Form exists", page);
+        if (result.ack) {
+            //Enter Credentials
+            page.evaluate(function() {
+                document.getElementById("username").value = "root";
+                document.getElementById("password").value = "";
+                document.querySelector('body > div.landing.non-search > form').submit();
+                return;
+            });
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testDropDownExists() {
+        var result = page.assertExists('#activity', "Menu Dropdown exists", page);
+        if (result.ack) {
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testManageGroups(){
+        var selector = '#activity';
+        var result = {};
+        result.ack = false;
+        result.status = "FAIL";
+        result.msg = "Manage Groups link option exists in Dropdown.";
+        return page.evaluate(function(selector,result,page_url) {
+            var elm = document.querySelector(selector);
+            var num_options = elm.options.length;
+            for (i = 0; i < num_options; i++) {
+                var option_text = elm.options[i].text;
+                if (option_text === "Manage Groups") {
+                    result.ack = true;
+                    result.status = "PASS";
+                    document.location.href = elm.options[i].value;
+                }
+            }
+            return result;
+        }, selector,result,page_url);
+    },
+    function testHelpButtonExists() {
+        var result = page.assertExists('button[data-pagename="Browse Groups"]', "Help Button exists On Manage groups Page", page);
+        if (result.ack) {
+            debugger;
+            //click on help
+            page.click('button[data-pagename="Browse Groups"]');
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testEditLinkForHelpArticlsExists() {
+        var result = page.assertExists('#page_name > a', "Edit Link for Help article exists", page);
+        if (result.ack) {
+            page.click('#page_name > a');
+
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function() {
+        // Output content of page to stdout after form has been submitted
+        page.evaluate(function() {
+            //console.log(document.querySelectorAll('html')[0].outerHTML);
+        });
+    }
+];
+
+
+interval = setInterval(function() {
+    if (!loadInProgress && typeof steps[testindex] == "function") {
+        var func = steps[testindex];
+        var result = steps[testindex]();
+        var function_name = functionName(func);
+        l("Test #" + (testindex + 1) + ": " + function_name);
+        if (result) {
+            l(result.status + " - " + result.msg);
+            delete result.elm;
+            results[function_name] = (result);
+        }
+        testindex++;
+    }
+    if (typeof steps[testindex] != "function") {
+        l("All Tests complete!");
+        renderTestResults();
+        phantom.exit();
+    }
+}, 2000);
\ No newline at end of file
diff --git a/tests/phantom.php b/tests/phantom.php
new file mode 100644
index 0000000..2d0b84b
--- /dev/null
+++ b/tests/phantom.php
@@ -0,0 +1,46 @@
+<?php
+
+function getFullURL()
+{
+    $pageURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
+    if(!in_array($_SERVER["SERVER_PORT"], array("80", "443"))) {
+        $pageURL .= $_SERVER["SERVER_NAME"] . ":" .
+            $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
+    } else {
+        $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
+    }
+    return $pageURL;
+}
+$path = pathinfo($_SERVER['PHP_SELF']);
+$path_url = str_replace(basename(__DIR__) . "/"
+    . basename(__FILE__), "", getFullURL());
+$mode = "";
+$resp_code = "";
+header($resp_code);
+header("Content-Type : application/json");
+$debug = false;
+if(isset($_GET['mode'])) {
+    if(isset($_GET['debug']) && $_GET['debug'] == "true") {
+        $debug = true;
+    }
+    $mode = htmlentities($_GET['mode'], ENT_QUOTES, "UTF-8");
+    $resp = array();
+    if(!in_array($mode, array("web", "mobile"))) {
+        $resp_code = "HTTP/1.1 400 Bad Request";
+    } else {
+        require_once 'YioopPhantomRunner.php';
+        $yioop_phantom_runner = new YioopPhantomRunner();
+        $test_results = ($yioop_phantom_runner->execute(
+            $mode . "_ui_tests.js", $path_url, $debug));
+        if(!$test_results) {
+            $resp_code = "HTTP/1.1 500";
+        } else {
+            $resp['results'] = $test_results;
+            $resp_code = "HTTP/1.1 200 OK";
+            echo(json_encode($resp));
+        }
+    }
+} else {
+    $resp_code = "HTTP/1.1 500";
+}
+exit();
\ No newline at end of file
diff --git a/tests/phantomjs_ui_test.php b/tests/phantomjs_ui_test.php
new file mode 100644
index 0000000..d7e8b5c
--- /dev/null
+++ b/tests/phantomjs_ui_test.php
@@ -0,0 +1,127 @@
+<?php
+
+/**
+ * SeekQuarry/Yioop --
+ * Open Source Pure PHP Search Engine, Crawler, and Indexer
+ * Copyright (C) 2009 - 2014  Chris Pollett chris@pollett.org
+ * LICENSE:
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * END LICENSE
+ *
+ * @author Eswara Rajesh Pinapala epinapala@live.com
+ * @package seek_quarry
+ * @subpackage test
+ * @license http://www.gnu.org/licenses/ GPL3
+ * @link http://www.seekquarry.com/
+ * @copyright 2009 - 2014
+ * @filesource
+ */
+/**
+ * Used to test the UI using PhantomJs.
+ *
+ * @author Eswara Rajesh Pinapala
+ * @package seek_quarry
+ * @subpackage test
+ */
+class PhantomjsUiTest extends JavascriptUnitTest
+{
+    /**
+     * This test case runs the UI test cases in JS using PhantomJS. It then
+     * sends the result JSON to Javascript land to render test results.
+     */
+    function UITestCase()
+    {
+        ?>
+        <script type="text/javascript" src="../scripts/basic.js"></script>
+        <script type="text/javascript" src="../scripts/help.js"></script>
+        <div id="web-ui-test">
+        </div>
+        <div id="mobile-ui-test">
+        </div>
+        <script type="text/javascript">
+            runTests("web");
+            runTests("mobile");
+            function runTests(mode)
+            {
+                elt(mode + "-ui-test").innerHTML = '<div style="width:200px;">' +
+                'Loading ' + mode + '-UI test Results<marquee ' +
+                'behavior="alternate">.............' + '</marquee></div>';
+                getPageWithCallback("phantom.php?mode=" + mode, "json",
+                    function (data)
+                    {
+                        renderResults(data.results, mode)
+                    },
+                    function (status)
+                    {
+                        elt(mode + "-ui-test").innerHTML = "Unable to run " +
+                        mode + " UI tests.";
+                        updateResultsSummary(0,
+                            Object.keys(data.results).length,
+                            'red', mode);
+                    });
+            }
+            function renderResults(results, mode)
+            {
+                elt(mode + "-ui-test").innerHTML = "";
+                var h2 = document.createElement("h2");
+                h2.innerHTML = "UI test results - " + mode;
+                elt(mode + "-ui-test").appendChild(h2);
+                var success_count = 0;
+                var results_size = 0;
+                for (var key in results) {
+                    var test_result = results[key];
+                    var cell;
+                    var row;
+                    var table;
+                    var color;
+                    table = document.createElement('table');
+                    if(test_result.ack) {
+                        color = 'lightgreen';
+                        success_count++;
+                    } else {
+                        color = 'red';
+                        row = table.insertRow(0);
+                        cell = row.insertCell(0);
+                        cell.style.fontWeight = 'bold';
+                        cell.innerHTML = key;
+                        cell = row.insertCell(1);
+                        cell.setAttribute("style", "background-color: " +
+                        color + ";");
+                        cell.innerHTML = test_result.status;
+                        elt(mode + "-ui-test").appendChild(table);
+                    }
+                    results_size++;
+                }
+                updateResultsSummary(success_count, results_size, 'lightgreen',
+                    mode);
+            }
+            function updateResultsSummary(pass, total, color, mode)
+            {
+                var cell;
+                var row;
+                var table;
+                table = document.createElement('table');
+                row = table.insertRow(0);
+                cell = row.insertCell(0);
+                cell.style.fontWeight = 'bold';
+                cell.innerHTML = "PhantomJS " + mode + " UI Tests";
+                cell = row.insertCell(1);
+                cell.setAttribute("style", "background-color: " +
+                color + ";");
+                cell.innerHTML = pass + "/" + total;
+                elt(mode + "-ui-test").appendChild(table);
+            }
+        </script>
+    <?php
+    }
+}
+?>
\ No newline at end of file
diff --git a/tests/web_ui_tests.js b/tests/web_ui_tests.js
new file mode 100644
index 0000000..9bb3e6b
--- /dev/null
+++ b/tests/web_ui_tests.js
@@ -0,0 +1,189 @@
+var page = require('webpage').create(),
+    testindex = 0,
+    loadInProgress = false,
+    fs = require('fs'),
+    path = 'results.json',
+    results = {},
+    system = require('system'),
+    args = system.args,
+    DEBUG = false,
+    page_url = args[1];
+
+if (args[2] === "true") {
+    DEBUG = true;
+}
+
+/**
+ * set viewport for debugging using slimerjs.
+ */
+page.viewportSize = {
+    width: 1440,
+    height: 768
+};
+
+
+/**
+ * Helper Functions
+ */
+function l(msg) {
+    !DEBUG || console.log("[Debug] : " + msg);
+}
+
+function functionName(fun) {
+    var ret = fun.toString();
+    ret = ret.substr('function '.length);
+    ret = ret.substr(0, ret.indexOf('('));
+    return ret;
+}
+
+function writeToFile(filename, contents) {
+    try {
+        fs.write(filename, contents, 'w');
+    } catch (e) {
+        console.log(e);
+    }
+}
+
+function renderTestResults() {
+    console.log(JSON.stringify(results));
+    //writeToFile(path,JSON.stringify(results));
+}
+
+/**
+ * PhantomJs Tests setup.
+ **/
+page.onConsoleMessage = function(msg) {
+    console.log(msg);
+};
+
+page.onLoadStarted = function() {
+    loadInProgress = true;
+};
+
+page.onLoadFinished = function() {
+    loadInProgress = false;
+};
+
+page.click = function(selector) {
+    l("Clicking Element[ " + selector + "]");
+    this.evaluate(function(selector, l) {
+        var e = document.createEvent("MouseEvents");
+        e.initEvent("click", true, true);
+        document.querySelector(selector).dispatchEvent(e);
+    }, selector, l);
+};
+
+page.assertExists = function(selector, message) {
+    var res = {};
+    res.msg = message;
+    res.elm = null;
+
+    res.elm = this.evaluate(function(selector) {
+        return document.querySelector(selector);
+    }, selector);
+
+    if (res.elm) {
+        res.status = "PASS";
+        res.ack = true;
+    } else {
+        res.status = "FAIL";
+        res.ack = false;
+    }
+
+    return res;
+};
+
+var steps = [
+
+    function testHomePage() {
+        page.open(page_url, function() {
+            return true;
+        });
+    },
+    function testSignInLink() {
+        var result = page.assertExists('body > div.landing-top-bar > div.user-nav > ul > li:nth-child(2) > a', "Signin link exists", page);
+        if (result.ack) {
+            page.evaluate(function() {
+                var ev = document.createEvent("MouseEvents");
+                ev.initEvent("click", true, true);
+                document.querySelector("a[href='./?c=admin']").dispatchEvent(ev);
+            });
+
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testLoginFormExists() {
+        var result = page.assertExists('body > div.landing.non-search > form', "Login Form exists", page);
+        if (result.ack) {
+            //Enter Credentials
+            page.evaluate(function() {
+                document.getElementById("username").value = "root";
+                document.getElementById("password").value = "";
+                document.querySelector('body > div.landing.non-search > form').submit();
+                return;
+            });
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testManageGroupsLinkExists() {
+        var result = page.assertExists('body > div.component-container > div:nth-child(3) > ul > li:nth-child(1) > a', "Manage groups Link exists", page);
+        if (result.ack) {
+            page.click('body > div.component-container > div:nth-child(3) > ul > li:nth-child(1) > a');
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testHelpButtonExists() {
+        var result = page.assertExists('button[data-pagename="Browse Groups"]', "Help Button exists On Manage groups Page", page);
+        if (result.ack) {
+            debugger;
+            //click on help
+            page.click('button[data-pagename="Browse Groups"]');
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function testEditLinkForHelpArticlsExists() {
+        var result = page.assertExists('#page_name > a', "Edit Link for Help article exists", page);
+        if (result.ack) {
+            page.click('#page_name > a');
+
+        } else {
+            l("Failed Test");
+        }
+        return result;
+    },
+    function() {
+        // Output content of page to stdout after form has been submitted
+        page.evaluate(function() {
+            //console.log(document.querySelectorAll('html')[0].outerHTML);
+        });
+    }
+];
+
+
+interval = setInterval(function() {
+    if (!loadInProgress && typeof steps[testindex] == "function") {
+        var func = steps[testindex];
+        var result = steps[testindex]();
+        var function_name = functionName(func);
+        l("Test #" + (testindex + 1) + ": " + function_name);
+        if (result) {
+            l(result.status + " - " + result.msg);
+            delete result.elm;
+            results[function_name] = (result);
+        }
+        testindex++;
+    }
+    if (typeof steps[testindex] != "function") {
+        l("All Tests complete!");
+        renderTestResults();
+        phantom.exit();
+    }
+}, 2000);
\ No newline at end of file
-- 
2.1.2


From 9163fe51100e95e27a34d381408dccd6eacb19ad Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Thu, 20 Nov 2014 22:51:50 -0800
Subject: [PATCH 4/6] -Added Delete confirmation at more places.

Signed-off-by: epinapala <epinapala@ebay.com>
---
 views/elements/manageclassifiers_element.php | 4 +++-
 views/elements/manageroles_element.php       | 4 +++-
 views/elements/mixcrawls_element.php         | 4 +++-
 views/elements/searchsources_element.php     | 4 +++-
 views/machinestatus_view.php                 | 4 +++-
 5 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/views/elements/manageclassifiers_element.php b/views/elements/manageclassifiers_element.php
index 827b4f8..0ffa8d9 100644
--- a/views/elements/manageclassifiers_element.php
+++ b/views/elements/manageclassifiers_element.php
@@ -119,7 +119,9 @@ class ManageclassifiersElement extends Element
                             tl('manageclassifiers_finalizing')."</span>");
                     }
                     ?></td>
-                    <td><a href="<?php e($base_url)
+                    <td><a onclick='javascript:return confirm("<?php
+                        e(tl('confirm_delete_operation'));
+                        ?>");' href="<?php e($base_url)
                         ?>deleteclassifier&amp;name=<?php
                         e($label) ?>"><?php
                             e(tl('manageclassifiers_delete')) ?></a></td>
diff --git a/views/elements/manageroles_element.php b/views/elements/manageroles_element.php
index 026c5d2..72d4460 100644
--- a/views/elements/manageroles_element.php
+++ b/views/elements/manageroles_element.php
@@ -100,7 +100,9 @@ class ManagerolesElement extends Element
                             tl('manageroles_element_delete').'</span>');
                     } else {
                     ?>
-                        <a href="<?php e($delete_url . 'name='.
+                        <a onclick='javascript:return confirm("<?php
+                        e(tl('confirm_delete_operation')); ?>");' href="<?php
+                        e($delete_url . 'name='.
                         $role['NAME']); ?>"><?php
                         e(tl('manageroles_element_delete'));
                     }?></a></td>
diff --git a/views/elements/mixcrawls_element.php b/views/elements/mixcrawls_element.php
index 8f63739..8a10eea 100644
--- a/views/elements/mixcrawls_element.php
+++ b/views/elements/mixcrawls_element.php
@@ -133,7 +133,9 @@ class MixcrawlsElement extends Element
             }
             ?>
             </td>
-            <td><a href="<?php e($base_url); ?>deletemix&timestamp=<?php
+            <td><a onclick='javascript:return confirm("<?php
+                e(tl('confirm_delete_operation')); ?>");' href="<?php
+                e($base_url); ?>deletemix&timestamp=<?php
                 e($mix['TIMESTAMP']); ?>"><?php
                 e(tl('mixcrawls_view_delete'));?></a></td>
             </tr>
diff --git a/views/elements/searchsources_element.php b/views/elements/searchsources_element.php
index a8b6841..aa06944 100644
--- a/views/elements/searchsources_element.php
+++ b/views/elements/searchsources_element.php
@@ -204,7 +204,9 @@ class SearchsourcesElement extends Element
                 $source['TIMESTAMP'].$paging1.$paging2); ?>"><?php
                 e(tl('searchsources_element_editmedia'));
             ?></a></td>
-            <td><a href="<?php e($base_url."&amp;arg=deletesource&amp;ts=".
+            <td><a onclick='javascript:return confirm("<?php
+                e(tl('confirm_delete_operation')); ?>");' href="<?php
+                e($base_url."&amp;arg=deletesource&amp;ts=".
                 $source['TIMESTAMP'].$paging1.$paging2); ?>"><?php
                 e(tl('searchsources_element_deletemedia'));
             ?></a></td></tr>
diff --git a/views/machinestatus_view.php b/views/machinestatus_view.php
index 061e40c..aac2268 100644
--- a/views/machinestatus_view.php
+++ b/views/machinestatus_view.php
@@ -98,7 +98,9 @@ class MachinestatusView extends View
             ?>
             <div class="box">
             <div class="float-opposite" >[<a href='<?php
-                e($base_url . "deletemachine&amp;name={$m['NAME']}"); ?>'><?php
+                e($base_url . "deletemachine&amp;name={$m['NAME']}");
+                ?>' onclick='javascript:return confirm("<?php
+                e(tl('confirm_delete_operation')); ?>");' ><?php
                 e(tl('machinestatus_view_delete'));?></a>]</div>
             <h3 class="nomargin"><?php e($m['NAME']);?></h3>
             <p><?php e($m['URL']);
-- 
2.1.2


From 961809e1fff35646a712c3e755ebefece80f3ae1 Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Thu, 20 Nov 2014 23:09:25 -0800
Subject: [PATCH 5/6] Changes to expand/collapse icons.

Signed-off-by: epinapala <epinapala@ebay.com>
---
 resources/collapse.png | Bin 1798 -> 1856 bytes
 resources/expand.png   | Bin 1712 -> 1961 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/resources/collapse.png b/resources/collapse.png
index f1a71597ed7519ecbd41b36c290cfd6d39c42abf..4c165c395c345ec147e76f20b9fdb8db4fa97fb4 100644
GIT binary patch
diff --git a/resources/expand.png b/resources/expand.png
index 830be4190131420c7e4b945955c0763afc2060aa..0a80c5c3adc1d330a9fc99a0bcf625a8a83d874d 100644
GIT binary patch
-- 
2.1.2


From da04198e8302ecd50a5ebdf18fd87b75bec36846 Mon Sep 17 00:00:00 2001
From: epinapala <epinapala@ebay.com>
Date: Thu, 20 Nov 2014 23:30:31 -0800
Subject: [PATCH 6/6] - Setup an icon for Start new thread with title attribute

---
 css/search.css                       |   4 ++++
 resources/new_thread.png             | Bin 0 -> 4313 bytes
 views/elements/groupfeed_element.php |   8 +++++---
 3 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 resources/new_thread.png

diff --git a/css/search.css b/css/search.css
index 5c5f2f6..e0f2f49 100755
--- a/css/search.css
+++ b/css/search.css
@@ -2907,4 +2907,8 @@ button.default{
 
 .sidebar {
     top : 180px;
+}
+
+.new-thread-icon{
+    margin-bottom : -5px;
 }
\ No newline at end of file
diff --git a/resources/new_thread.png b/resources/new_thread.png
new file mode 100644
index 0000000000000000000000000000000000000000..71d49a0956c2356ee9fe139749439f945c55692c
GIT binary patch
diff --git a/views/elements/groupfeed_element.php b/views/elements/groupfeed_element.php
index 9ab58e5..75d45df 100644
--- a/views/elements/groupfeed_element.php
+++ b/views/elements/groupfeed_element.php
@@ -389,11 +389,13 @@ class GroupfeedElement extends Element implements CrawlConstants
                         in_array($page["MEMBER_ACCESS"], array(GROUP_READ_WRITE,
                         GROUP_READ_WIKI)) ) {
                     ?>
-                    (<a  class='gray-link' href='javascript:start_thread_form
+                    <a  class='gray-link' href='javascript:start_thread_form
                     (<?php
                         e("{$page['ID']},".
-                            "{$page['GROUP_ID']}"); ?>)'><?php
-                            e(tl('groupfeed_element_start_thread'));?></a>)
+                            "{$page['GROUP_ID']}"); ?>)' title='<?php
+                        e(tl('groupfeed_element_start_thread'));?>'><img
+                      class="new-thread-icon" src='resources/new_thread.png'
+                            /></a>
                     <?php } ?>
                 </a></h2>
             <?php
-- 
2.1.2

