Skip to content

Commit

Permalink
Revert "All smilie versions are getting loaded into SCEDitor #1"
Browse files Browse the repository at this point in the history
This reverts commit 43108d1.
  • Loading branch information
cYbercOsmOnauT committed Jun 11, 2015
1 parent 43108d1 commit 9488a79
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 53 deletions.
9 changes: 0 additions & 9 deletions .idea/composerJson.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/dictionaries/tekin.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

3 changes: 2 additions & 1 deletion nassim/sceditor/event/sce.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions nassim/sceditor/styles/all/template/event/simple_footer_after.html

This file was deleted.

14 changes: 4 additions & 10 deletions nassim/sceditor/styles/all/template/js/sce.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
});
Expand Down

0 comments on commit 9488a79

Please sign in to comment.