mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
HTML/CSS code cleaning.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10298 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
70ac43c24d
commit
fef0e92afd
80 changed files with 2270 additions and 2801 deletions
|
|
@ -1,11 +1,55 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
|
||||
<div class="emoticonList">
|
||||
<select name="list" id="selectEmoticonList">
|
||||
<!--@foreach($emoticon_list as $key => $val)-->
|
||||
<option <!--@if($val=='msn')-->selected="select"<!--@end--> value="{$val}">{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</div>
|
||||
<div id="emoticons"></div>
|
||||
<script type="text/javascript">
|
||||
jQuery(function($){
|
||||
|
||||
var is_popup = window._isPoped;
|
||||
|
||||
/**
|
||||
* @brief Get emoticon list by name
|
||||
* @params String emoticon name
|
||||
*/
|
||||
function getEmoticons(emoName) {
|
||||
var params = {component:'emoticon', emoticon:emoName, method:'getEmoticonList'};
|
||||
var resp_tags = 'error message emoticons'.split(' ');
|
||||
|
||||
exec_xml('editor', 'procEditorCall', params, completeGetEmoticons, resp_tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load callback
|
||||
*/
|
||||
function completeGetEmoticons(ret_obj) {
|
||||
var emoticons = ret_obj['emoticons'].split("\n");
|
||||
var html = [];
|
||||
for(var i=0;i<emoticons.length;i++) {
|
||||
html[html.length] = '<img src="./modules/editor/components/emoticon/tpl/images/'+emoticons[i]+'" class="emoticon" />';
|
||||
}
|
||||
jQuery('#emoticons').html(html.join('')).find('img.emoticon').click(insertEmoticon);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Insert a selected emoticon into the document
|
||||
* @params Event jQuery event
|
||||
*/
|
||||
function insertEmoticon() {
|
||||
var url, html, iframe, win = is_popup?opener:window;
|
||||
|
||||
if(!win) return;
|
||||
|
||||
html = '<img src="'+this.src+'" class="emoticon" />';
|
||||
|
||||
win.editorFocus(win.editorPrevSrl);
|
||||
win.editorRelKeys[win.editorPrevSrl].pasteHTML(html);
|
||||
|
||||
if (is_popup) window.focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// load default emoticon set
|
||||
getEmoticons('msn');
|
||||
$('#selectEmoticonList').change(function(){ getEmoticons(this.value) });
|
||||
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue