From 9488a79db75aae3814d2d18738ee33e6241f100b Mon Sep 17 00:00:00 2001 From: Tekin Birduezen Date: Thu, 11 Jun 2015 17:09:12 +0200 Subject: [PATCH] Revert "All smilie versions are getting loaded into SCEDitor #1" This reverts commit 43108d18ea2c34b78333f384c11a96f039d5ba05. --- .idea/composerJson.xml | 9 --------- .idea/dictionaries/tekin.xml | 3 --- .idea/inspectionProfiles/Project_Default.xml | 11 ----------- .idea/inspectionProfiles/profiles_settings.xml | 7 ------- nassim/sceditor/event/sce.php | 3 ++- .../all/template/event/simple_footer_after.html | 12 ------------ nassim/sceditor/styles/all/template/js/sce.js | 14 ++++---------- 7 files changed, 6 insertions(+), 53 deletions(-) delete mode 100644 .idea/composerJson.xml delete mode 100644 .idea/dictionaries/tekin.xml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 nassim/sceditor/styles/all/template/event/simple_footer_after.html diff --git a/.idea/composerJson.xml b/.idea/composerJson.xml deleted file mode 100644 index 4199499..0000000 --- a/.idea/composerJson.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/dictionaries/tekin.xml b/.idea/dictionaries/tekin.xml deleted file mode 100644 index 27c485a..0000000 --- a/.idea/dictionaries/tekin.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index c66df00..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b31283..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/nassim/sceditor/event/sce.php b/nassim/sceditor/event/sce.php index 863d9e6..e951b64 100644 --- a/nassim/sceditor/event/sce.php +++ b/nassim/sceditor/event/sce.php @@ -51,7 +51,8 @@ public function initialize_sceditor () { // We need to get all smilies with url and code $sql = 'SELECT smiley_url, code - FROM ' . SMILIES_TABLE; + FROM ' . SMILIES_TABLE . ' + GROUP BY smiley_url'; // Caching the smilies for 10 minutes should be okay // they don't get changed so often $result = $this->db->sql_query($sql, 600); diff --git a/nassim/sceditor/styles/all/template/event/simple_footer_after.html b/nassim/sceditor/styles/all/template/event/simple_footer_after.html deleted file mode 100644 index 5f4597d..0000000 --- a/nassim/sceditor/styles/all/template/event/simple_footer_after.html +++ /dev/null @@ -1,12 +0,0 @@ - - - \ No newline at end of file diff --git a/nassim/sceditor/styles/all/template/js/sce.js b/nassim/sceditor/styles/all/template/js/sce.js index ea10299..b31b3f3 100644 --- a/nassim/sceditor/styles/all/template/js/sce.js +++ b/nassim/sceditor/styles/all/template/js/sce.js @@ -78,20 +78,14 @@ $.sceditor.command.set('size', { } }); -var textarea; -// This is needed for the smilies popup -function setSmilie(tag) { - textarea.data('sceditor').insert(' ' + tag + ' '); -} -$(function () { - // Don't need to select the node again and again - textarea = $('textarea'); - // Hide the normal BBCode Buttons +$(document).ready(function () { $('#format-buttons').hide(); $('#smiley-box a img').each(function () { + $(this).css('cursor', 'pointer'); + $(this).click(function () { - setSmilie($(this).attr('alt')); + $('textarea').data('sceditor').insert(' ' + $(this).attr('alt') + ' '); return false; }); });