- Timestamp:
- 08/07/07 17:02:18 (1 year ago)
- Files:
-
- branch/app_controller.php (modified) (1 diff)
- branch/config/routes.php (modified) (1 diff)
- branch/controllers/posts_controller.php (modified) (4 diffs)
- branch/views/elements/js_include.ctp (modified) (3 diffs)
- branch/views/layouts/default.ctp (modified) (1 diff)
- branch/views/pages/admin_add.ctp (modified) (2 diffs)
- branch/views/pages/admin_edit.ctp (modified) (2 diffs)
- branch/views/posts/add.ctp (deleted)
- branch/views/posts/admin_add.ctp (modified) (3 diffs)
- branch/views/posts/admin_edit.ctp (modified) (2 diffs)
- branch/views/posts/admin_home.ctp (deleted)
- branch/views/posts/admin_index.ctp (modified) (2 diffs)
- branch/views/posts/edit.ctp (deleted)
- branch/views/posts/index.ctp (modified) (1 diff)
- branch/webroot/css/default.css (modified) (5 diffs)
- branch/webroot/files/click.mp3 (added)
- branch/webroot/js/ext-all.js (deleted)
- branch/webroot/js/ext-jquery-adapter.js (deleted)
- branch/webroot/js/ext-layout.js (deleted)
- branch/webroot/js/forminit.js (modified) (1 diff)
- branch/webroot/js/jtageditor.full (added)
- branch/webroot/js/jtageditor.full/_icons (added)
- branch/webroot/js/jtageditor.full/_icons/bold.png (added)
- branch/webroot/js/jtageditor.full/_icons/code.png (added)
- branch/webroot/js/jtageditor.full/_icons/color.png (added)
- branch/webroot/js/jtageditor.full/_icons/comments.png (added)
- branch/webroot/js/jtageditor.full/_icons/emoticon-smile.png (added)
- branch/webroot/js/jtageditor.full/_icons/emoticon-surprised.png (added)
- branch/webroot/js/jtageditor.full/_icons/emoticon-tongue.png (added)
- branch/webroot/js/jtageditor.full/_icons/emoticon-unhappy.png (added)
- branch/webroot/js/jtageditor.full/_icons/emoticon-wink.png (added)
- branch/webroot/js/jtageditor.full/_icons/error.png (added)
- branch/webroot/js/jtageditor.full/_icons/folder.png (added)
- branch/webroot/js/jtageditor.full/_icons/font.png (added)
- branch/webroot/js/jtageditor.full/_icons/formula.png (added)
- branch/webroot/js/jtageditor.full/_icons/h.png (added)
- branch/webroot/js/jtageditor.full/_icons/h1.png (added)
- branch/webroot/js/jtageditor.full/_icons/h2.png (added)
- branch/webroot/js/jtageditor.full/_icons/h3.png (added)
- branch/webroot/js/jtageditor.full/_icons/h4.png (added)
- branch/webroot/js/jtageditor.full/_icons/h5.png (added)
- branch/webroot/js/jtageditor.full/_icons/h6.png (added)
- branch/webroot/js/jtageditor.full/_icons/handle.png (added)
- branch/webroot/js/jtageditor.full/_icons/image.png (added)
- branch/webroot/js/jtageditor.full/_icons/indent.png (added)
- branch/webroot/js/jtageditor.full/_icons/italic.png (added)
- branch/webroot/js/jtageditor.full/_icons/link.png (added)
- branch/webroot/js/jtageditor.full/_icons/list-bullets.png (added)
- branch/webroot/js/jtageditor.full/_icons/list-item.png (added)
- branch/webroot/js/jtageditor.full/_icons/list-numbers.png (added)
- branch/webroot/js/jtageditor.full/_icons/media.png (added)
- branch/webroot/js/jtageditor.full/_icons/paragraph.png (added)
- branch/webroot/js/jtageditor.full/_icons/picture.png (added)
- branch/webroot/js/jtageditor.full/_icons/preview.png (added)
- branch/webroot/js/jtageditor.full/_icons/quotes.png (added)
- branch/webroot/js/jtageditor.full/_icons/signature.png (added)
- branch/webroot/js/jtageditor.full/_icons/stroke.png (added)
- branch/webroot/js/jtageditor.full/_icons/style.png (added)
- branch/webroot/js/jtageditor.full/_icons/subscript.png (added)
- branch/webroot/js/jtageditor.full/_icons/superscript.png (added)
- branch/webroot/js/jtageditor.full/_icons/table-col.png (added)
- branch/webroot/js/jtageditor.full/_icons/table-row.png (added)
- branch/webroot/js/jtageditor.full/_icons/table.png (added)
- branch/webroot/js/jtageditor.full/_icons/tags-close.png (added)
- branch/webroot/js/jtageditor.full/_icons/tags-delete.png (added)
- branch/webroot/js/jtageditor.full/_icons/tags.png (added)
- branch/webroot/js/jtageditor.full/_icons/underline.png (added)
- branch/webroot/js/jtageditor.full/_images (added)
- branch/webroot/js/jtageditor.full/_images/bg-bbcode.png (added)
- branch/webroot/js/jtageditor.full/_images/bg-container.png (added)
- branch/webroot/js/jtageditor.full/_images/bg-html.png (added)
- branch/webroot/js/jtageditor.full/_images/bg-textile.png (added)
- branch/webroot/js/jtageditor.full/_images/bg-wiki.png (added)
- branch/webroot/js/jtageditor.full/_images/handle.png (added)
- branch/webroot/js/jtageditor.full/bbcode (added)
- branch/webroot/js/jtageditor.full/bbcode/bbcode-parser.php (added)
- branch/webroot/js/jtageditor.full/bbcode/bbcode-skin.css (added)
- branch/webroot/js/jtageditor.full/bbcode/bbcode-tags.js (added)
- branch/webroot/js/jtageditor.full/changelog.txt (added)
- branch/webroot/js/jtageditor.full/html (added)
- branch/webroot/js/jtageditor.full/html/html-skin.css (added)
- branch/webroot/js/jtageditor.full/html/html-tags.js (added)
- branch/webroot/js/jtageditor.full/index.html (added)
- branch/webroot/js/jtageditor.full/jquery.js (added)
- branch/webroot/js/jtageditor.full/jquery.jtageditor.js (added)
- branch/webroot/js/jtageditor.full/jquery.jtageditor.pack.js (added)
- branch/webroot/js/jtageditor.full/textile (added)
- branch/webroot/js/jtageditor.full/textile/textile-parser.php (added)
- branch/webroot/js/jtageditor.full/textile/textile-skin.css (added)
- branch/webroot/js/jtageditor.full/textile/textile-tags.js (added)
- branch/webroot/js/jtageditor.full/wiki (added)
- branch/webroot/js/jtageditor.full/wiki/wiki-parser.php (added)
- branch/webroot/js/jtageditor.full/wiki/wiki-skin.css (added)
- branch/webroot/js/jtageditor.full/wiki/wiki-tags.js (added)
- branch/webroot/js/webrocket.js (modified) (3 diffs)
- branch/webroot/js/wymeditor (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/app_controller.php
r140 r142 74 74 75 75 76 $sitetheme = " extlayout";76 $sitetheme = "default"; 77 77 78 78 $this->layout = $sitetheme; branch/config/routes.php
r119 r142 36 36 Router::connect('/', array('controller' => 'posts', 'action' => 'index')); 37 37 Router::connect('/admin', array('controller' => 'users', 'action' => 'login')); 38 Router::connect('/news', array('controller' => 'posts', 'action' => 'index')); 38 39 Router::parseExtensions('rss'); 39 40 /** branch/controllers/posts_controller.php
r138 r142 46 46 } 47 47 48 function add() {49 if ($this->level >= 500 ) {50 if(!empty($this->data)) {51 $this->data['Post']['user_id'] = $this->othAuth->user('id');52 $this->cleanUpFields();53 $this->Post->create();54 if($this->Post->save($this->data)) {55 $this->Session->setFlash('The Post has been saved');56 $this->redirect(array('action'=>'index'), null, true);57 } else {58 $this->Session->setFlash('The Post could not be saved. Please, try again.');59 }60 }61 $this->set('access_levels', $this->Group->generateList(null, 'Group.name ASC', null,'{n}.Group.level', '{n}.Group.name'));62 $this->set('subjects', $this->Post->Subject->generateList());63 $this->set('images', $this->Post->Image->generateList(null,null,null,'{n}.Image.id', '{n}.Image.alt'));64 } else {65 $this->Session->setFlash('You do not have permission to add a post. Please log in.');66 $this->redirect(array('controller' => 'users','action'=>'login'), null, true);67 }68 69 }70 71 function edit($id = null) {72 if ($this->othAuth->user('id') == $this->data['Post']['user_id'] || $this->level >= 900) {73 if(!$id && empty($this->data)) {74 $this->Session->setFlash('Invalid Post');75 $this->redirect(array('action'=>'index'), null, true);76 }77 if(!empty($this->data)) {78 $this->cleanUpFields();79 if($this->Post->save($this->data)) {80 $this->Session->setFlash('The Post saved');81 $this->redirect(array('action'=>'index'), null, true);82 } else {83 $this->Session->setFlash('The Post could not be saved. Please, try again.');84 }85 }86 $this->set('access_levels', $this->Group->generateList(null, 'Group.name ASC', null,'{n}.Group.level', '{n}.Group.name'));87 $this->set('subjects', $this->Post->Subject->generateList());88 $this->set('images', $this->Post->Image->generateList(null,null,null,'{n}.Image.id', '{n}.Image.alt'));89 } else {90 $this->Session->setFlash('You do no have permission to edit this post');91 $this->redirect(array('controller'=>'users','action'=>'login'), null, true);92 }93 if(empty($this->data)) {94 $this->data = $this->Post->read(null, $id);95 }96 }97 98 function delete($id = null) {99 if(!$id) {100 $this->Session->setFlash('Invalid id for Post');101 $this->redirect(array('action'=>'index'), null, true);102 }103 if ($this->othAuth->user('id') == $this->data['Post']['user_id'] || $this->level >= 900) {104 if($this->Post->del($id)) {105 $this->Session->setFlash('Post #'.$id.' deleted');106 $this->redirect(array('action'=>'index'), null, true);107 }108 } else {109 $this->Session->setFlash('You do no have permission to edit this post');110 $this->redirect(array('controller'=>'users','action'=>'login'), null, true);111 }112 }113 114 115 48 function admin_index() { 116 49 // Increase recursion to get post tags and comments … … 150 83 $this->Post->create(); 151 84 if($this->Post->save($this->data)) { 152 if ($this->isAjax) {153 $this->redirect(array('action' => 'home#remote-tab-1'),null, true);154 } else {155 85 $this->Session->setFlash('The Post has been saved'); 156 $this->redirect(array('action'=>'home'), null, true); 157 } 86 $this->redirect(array('action'=>'index'), null, true); 158 87 } else { 159 88 $this->Session->setFlash('The Post could not be saved. Please, try again.'); … … 173 102 $this->cleanUpFields(); 174 103 if($this->Post->save($this->data)) { 175 if ($this->isAjax) {176 $this->redirect('#remote-tab-1');177 } else {178 104 $this->Session->setFlash('The Post has been saved'); 179 $this->redirect(array('action'=>'home'), null, true); 180 } 105 $this->redirect(array('action'=>'index'), null, true); 181 106 } else { 182 107 $this->Session->setFlash('The Post could not be saved. Please, try again.'); … … 206 131 } 207 132 208 function admin_home()209 {210 211 }212 213 133 function recentPosts($max = 5) 214 134 { branch/views/elements/js_include.ctp
r140 r142 5 5 <?php e($javascript->link('jquery'));?> 6 6 <?php e($javascript->link('jquery-plugins'));?> 7 <?php e($javascript->link('ext-jquery-adapter'));?>8 <?php e($javascript->link('ext-all'));?>9 <?php e($javascript->link('ext-layout'));?>10 7 11 8 <?php e($javascript->link('jquery.autocomplete'));?> … … 18 15 <?php e($javascript->link('jquery.jmaps'));?> 19 16 <?php e($javascript->link('jquery.thickbox'));?> 20 <?php e($javascript->link('jquery.tabs'));?>21 <?php e($javascript->link('jquery.history_remote.pack'));?>22 17 <?php e($javascript->link('jquery.ability'));?> 23 18 <?php e($javascript->link('jquery.passstrength'));?> … … 26 21 <?php e($javascript->link('ui.drag'));?> 27 22 <?php e($javascript->link('ui.drag.ext'));?> 28 <!-- WymEditor JavaScript--> 29 <?php e($javascript->link('wymeditor/jquery.wymeditor'));?> 30 <?php e($javascript->link('wymeditor/plugins/tidy/jquery.wymeditor.tidy'));?> 31 <?php e($javascript->link('wymeditor/plugins/hovertools/jquery.wymeditor.hovertools'));?> 23 <?php e($javascript->link('jtageditor.full/jquery.jtageditor'));?> 24 32 25 <!-- Webrocket JS File--> 33 26 <?php e($javascript->link('webrocket'));?> branch/views/layouts/default.ctp
r139 r142 17 17 <div id="doc3" class="yui-t7"> 18 18 <div id="hd"> 19 < div id="accessibility" style="position:relative;"></div>19 <!--<div id="accessibility" style="position:relative;"></div>--> 20 20 </div> 21 21 <div class="nav-area"><?php e($this->renderElement('mainnav'));?></div> branch/views/pages/admin_add.ctp
r124 r142 6 6 <legend>Main Content</legend> 7 7 <?php echo $form->input('title', array('class' => 'required'));?> 8 <?php echo $form->input('body', array('class' => ' wymeditor'));?>8 <?php echo $form->input('body', array('class' => 'rte'));?> 9 9 </fieldset> 10 10 … … 21 21 </fielset> 22 22 23 <?php echo $form->end('Add' , array('class'=>'wymupdate'));?>23 <?php echo $form->end('Add');?> 24 24 </form> 25 25 </div> branch/views/pages/admin_edit.ctp
r124 r142 7 7 <?php echo $form->input('id');?> 8 8 <?php echo $form->input('title', array('class' => 'required'));?> 9 <?php echo $form->input('body', array('class' => ' wymeditor'));?>9 <?php echo $form->input('body', array('class' => 'rte'));?> 10 10 </fieldset> 11 11 … … 22 22 </fielset> 23 23 24 <?php echo $form->end('Update' , array('class'=>'wymupdate'));?>24 <?php echo $form->end('Update');?> 25 25 </form> 26 26 </div> branch/views/posts/admin_add.ctp
r124 r142 1 <?php e($javascript->link('forminit'));?>2 3 <div class="success" style="display:none;">4 <h2>Post has successfuly saved.</h2>5 </div>6 7 1 <div class="post"> 8 <h2> New Post</h2>2 <h2><?php __('New');?> <?php __('Post');?></h2> 9 3 <?php echo $form->create('Post');?> 10 4 <fieldset id="main-content"> 11 <legend> Main Content</legend>5 <legend><?php __('Main Content');?></legend> 12 6 <?php echo $form->input('title', array('class' => 'required'));?> 13 7 <?php echo $form->input('byline', array('class' => 'required'));?> 14 <?php echo $form->input('body',array('class'=>' wymeditor'));?>8 <?php echo $form->input('body',array('class'=>'rte'));?> 15 9 <?php e($form->input('image_id', array('options'=>$images)));?> 16 10 <a href="<?php echo $html->url('/admin/images/add');?>?KeepThis=true&TB_iframe=true&height=400&width=600" id="add-image" class="thickbox">Upload New Image</a> … … 18 12 19 13 <fieldset id="meta-content"> 20 <legend> Meta Data</legend>14 <legend><?php __('Meta Data');?></legend> 21 15 <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 22 16 <?php echo $form->input('tags', array('class' => 'tags', 'type'=>'text'));?> … … 24 18 25 19 <fieldset id="publishing-options"> 26 <legend> Publishing Options</legend>20 <legend><?php __('Publishing Options');?></legend> 27 21 <?php echo $form->input('post_date', array('class' => 'required'));?> 28 22 <?php echo $form->input('access_level', array('class' => 'required', 'options'=>$access_levels));?> 29 23 <?php echo $form->input('frontpage');?> 30 24 <?php echo $form->input('published', array('class' => 'required'));?> 31 </fieldset> 32 33 <?php echo $form->submit('Add', array('class'=>'wymupdate'));?> 25 </fieldset> 26 <?php echo $form->submit('Add');?> 34 27 </form> 35 28 </div> branch/views/posts/admin_edit.ctp
r124 r142 1 <?php e($javascript->link('forminit'));?>2 3 <div class="success" style="display:none;">4 <h2>Post has successfuly saved.</h2>5 </div>6 7 1 <div class="post"> 8 <h2> Edit Post</h2>2 <h2><?php __('Edit');?> <?php __('Post');?></h2> 9 3 <?php echo $form->create('Post');?> 10 4 <fieldset id="main-content"> 11 <legend> Main Content</legend>5 <legend><?php __('Main Content');?></legend> 12 6 <?php echo $form->input('id');?> 13 7 <?php echo $form->input('title', array('class' => 'required'));?> 14 8 <?php echo $form->input('byline', array('class' => 'required'));?> 15 <?php echo $form->input('body',array('class'=>' wymeditor'));?>9 <?php echo $form->input('body',array('class'=>'rte'));?> 16 10 <?php e($form->input('image_id', array('options'=>$images)));?> 17 <a href="/admin/images/add?KeepThis=true&TB_iframe=true&height=400&width=600" id="add-image" class="thickbox">Upload New Image</a>18 11 </fieldset> 19 12 20 13 <fieldset id="meta-content"> 21 <legend> Meta Data</legend>14 <legend><?php __('Meta Data');?></legend> 22 15 <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 23 16 <?php echo $form->input('tags', array('class' => 'tags', 'type'=>'text'));?> … … 25 18 26 19 <fieldset id="publishing-options"> 27 <legend> Publishing Options</legend>20 <legend><?php __('Publishing Options');?></legend> 28 21 <?php echo $form->input('post_date', array('class' => 'required'));?> 29 22 <?php echo $form->input('access_level', array('class' => 'required', 'options'=>$access_levels));?> 30 23 <?php echo $form->input('frontpage');?> 31 24 <?php echo $form->input('published', array('class' => 'required'));?> 32 </fieldset> 33 34 <?php echo $form->submit('Add', array('class'=>'wymupdate'));?> 25 </fieldset> 26 <?php echo $form->submit('Update');?> 35 27 </form> 36 28 </div> branch/views/posts/admin_index.ctp
r131 r142 1 <?php e($javascript->link('forminit'));?>2 3 1 <?php if ($posts) { ?> 4 2 <div class="posts"> 5 <h2>List Posts</h2> 6 <div> 7 Overall there are <?php e($postcount);?> posts on this site.<br /> 8 From these posts, <?php e($posts[0]['User']['posts_count']);?> are yours. 9 </div> 3 <h2><?php __('Post');?> <?php __('Managment');?></h2> 4 <dl class="stats"> 5 <dd><?php e($postcount);?></dd> 6 <dt><?php __('Overall');?> <?php __('Posts');?></dt> 7 <dd><?php e($posts[0]['User']['posts_count']);?></dd> 8 <dt><?php __('Your');?> <?php __('Posts');?></dt> 9 </dl> 10 <br style="clear:both;" /> 11 <span class="new-item"><?php echo $html->link('New Post', array('action'=>'add')); ?></span> 10 12 11 13 <table cellpadding="0" cellspacing="0"> … … 58 60 </div> 59 61 <?php } else { ?> 60 <h2>There are currently no posts. Click <?php echo $html->link('here', '#remote-tab-2'); ?> to create one.</h2>62 <h2>There are currently no posts. Click <?php echo $html->link('here', array('action'=>'add')); ?> to create one.</h2> 61 63 <?php } ?> branch/views/posts/index.ctp
r139 r142 4 4 <div class="hentry"> 5 5 <h2 class="entry-title"><?php e($html->link($post['Post']['title'], array('controller'=>'posts', 'action'=>'view', $post['Post']['slug']))); ?></h2> 6 <?php echo $html->link('Edit', array('action'=>'edit', $post['Post']['id'])); ?>7 6 <abbr class="updated" title=""><?php echo $post['Post']['post_date']; ?></abbr> 8 <span class="vcard author"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id']) ); ?></span>7 <span class="vcard author"><?php echo $html->link($post['User']['username'], array('controller'=> 'users', 'action'=>'view', $post['User']['id']), array('class'=>'fn')); ?></span> 9 8 <div class="entry-content"> 10 9 <div class="entry-text"> branch/webroot/css/default.css
r133 r142 7 7 @import url('jquery.tabs-ie.css'); 8 8 @import url('thickbox.css'); 9 @import url('../js/ wymeditor/skins/default/screen.css');9 @import url('../js/jtageditor.full/html/html-skin.css'); 10 10 11 11 /* Layout Code */ … … 79 79 display: block; 80 80 } 81 82 input[type="text"], input[type="password"],input[type="submit"], textarea, select, input[type="checkbox"] { 83 border:3px solid #3366CC; 84 } 85 86 input[type="text"]:focus, input[type="password"]:focus,input[type="submit"]:focus, textarea:focus, select:focus { 87 border:3px solid #f00; 88 } 89 81 90 input[type="text"], input[type="password"] { 82 91 display: block; … … 87 96 } 88 97 input[type="text"], textarea { 89 border-top: 2px solid #999; 90 border-left: 2px solid #999; 91 border-bottom: 1px solid #ccc; 92 border-right: 1px solid #ccc; 98 93 99 } 94 100 95 101 input[type="submit"] { 96 102 width:200px; 97 border-bottom: 2px solid #999; 98 border-right: 2px solid #999; 99 border-top: 1px solid #ccc; 100 border-left: 1px solid #ccc; 101 } 102 103 input:focus { 104 background: #ccffcc; 105 } 103 } 104 106 105 textarea { 107 106 width: 99%;; … … 210 209 width:80%; 211 210 background:transparent; 212 } 211 line-height:1.2em; 212 } 213 div.hentry div.entry-content div.entry-text p { 214 line-height:1.4em; 215 margin-bottom:1.2em; 216 } 217 213 218 div.hentry div.meta { 214 219 clear:both; … … 257 262 padding-left: 18px; 258 263 } 264 265 .stats { 266 display:block; 267 width: 300px; 268 border:3px solid #3366CC; 269 } 270 271 .stats dt { 272 background: #111; 273 border:1px solid #000; 274 } 275 276 .stats dd { 277 float:right; 278 } 279 280 .new-item { 281 width: 200px; 282 height:30px; 283 border:3px solid #fff; 284 } branch/webroot/js/forminit.js
r131 r142 1 1 $j(function() { 2 3 $j(".wymeditor").wymeditor({4 5 classesItems:[6 {name:"date", title:"PARA: Date", expr:"p"},7 {name:"hidden-note", title:"PARA: Hidden note", expr:"p[@class!=\"important\"]"},8 {name:"important", title:"PARA: Important", expr:"p[@class!=\"hidden-note\"]"},9 {name:"border", title:"IMG: Border", expr:"img"},10 {name:"special", title:"LIST: Special", expr:"ul, ol"},11 {name:"vcard", title:"hCard Microformat", expr:"p[@class!=\"hcard\"]"}],12 13 editorStyles:[14 {name:".hidden-note", css:"color: #999; border: 2px solid #ccc;"},15 {name:".border", css:"border: 4px solid #ccc;"},16 {name:".date", css:"background-color: #ff9; border: 2px solid #ee9;"},17 {name:".important", css:"color: red; font-weight: bold; border: 2px solid red;"},18 {name:".special", css:"background-color: #fc9; border: 2px solid red;"},19 {name:".vcard", css:"border:2px solid #000;"}],20 21 dialogStyles:[22 {name:".hidden-note", css:"display: none;"},23 {name:".border", css:"border: 1px solid #ccc;"},24 {name:".date", css:"color: #ccf;"},25 {name:".important", css:"color: red; font-weight: bold;"},26 {name:".special", css:"color: green;"},27 {name:".vcard", css:"color:red"}],28 29 postInit:function (wym) {30 wym.status(" ");31 var wymtidy = wym.tidy({sUrl:"/js/wymeditor/plugins/tidy/tidy.php", sButtonHtml:"<li class='wym_tools_tidy'><a name='CleanUp' href='#' style='background-image: url(/js/wymeditor/plugins/tidy/wand.png)'>Clean up HTML</a></li>"});32 wymtidy.init();wym.hovertools();}, postInitDialog:function (wym, wdw) {var body = wdw.document.body;var sSelectLink = "<div class='row row-indent'><select class='wym_select_link'><option selected value='WYMeditor http://www.wymeditor.org/'>WYMeditor</option><option value='SourceForge http://www.sourceforge.net/'>SourceForge</option><option value='GNU http://www.gnu.org/'>GNU</option></select><input class='wym_choose' type='button' value='{Choose}' /></div>";33 $j(body).filter(".wym_dialog_link").find("fieldset").eq(0).prepend(wym.replaceStrings(sSelectLink));34 $j(body).find(".wym_choose").click(function () {var sVal = $j(body).find(".wym_select_link").val();35 $j(body).find(".wym_href").val(sVal.substring(sVal.lastIndexOf(" ") + 1));36 $j(body).find(".wym_title").val(sVal.substr(0, sVal.lastIndexOf(" ")));});}37 });38 39 $j(".wymsubmit").click(function () {alert($j(this).siblings(".wymeditor").val());});40 2 41 3 $j(".tags").autocomplete("/tags/autocomplete", { multiple: true, mustMatch: false }); branch/webroot/js/webrocket.js
r137 r142 2 2 3 3 $j(function() { 4 5 $j(".wymeditor").wymeditor({6 7 classesItems:[8 {name:"date", title:"PARA: Date", expr:"p"},9 {name:"hidden-note", title:"PARA: Hidden note", expr:"p[@class!=\"important\"]"},10 {name:"important", title:"PARA: Important", expr:"p[@class!=\"hidden-note\"]"},11 {name:"border", title:"IMG: Border", expr:"img"},12 {name:"special", title:"LIST: Special", expr:"ul, ol"},13 {name:"vcard", title:"hCard Microformat", expr:"p[@class!=\"hcard\"]"}],14 15 editorStyles:[16 {name:".hidden-note", css:"color: #999; border: 2px solid #ccc;"},17 {name:".border", css:"border: 4px solid #ccc;"},18 {name:".date", css:"background-color: #ff9; border: 2px solid #ee9;"},19 {name:".important", css:"color: red; font-weight: bold; border: 2px solid red;"},20 {name:".special", css:"background-color: #fc9; border: 2px solid red;"},21 {name:".vcard", css:"border:2px solid #000;"}],22 23 dialogStyles:[24 {name:".hidden-note", css:"display: none;"},25 {name:".border", css:"border: 1px solid #ccc;"},26 {name:".date", css:"color: #ccf;"},27 {name:".important", css:"color: red; font-weight: bold;"},28 {name:".special", css:"color: green;"},29 {name:".vcard", css:"color:red"}],30 31 postInit:function (wym) {32 wym.status(" ");33 var wymtidy = wym.tidy({sUrl:"/js/wymeditor/plugins/tidy/tidy.php", sButtonHtml:"<li class='wym_tools_tidy'><a name='CleanUp' href='#' style='background-image: url(/js/wymeditor/plugins/tidy/wand.png)'>Clean up HTML</a></li>"});34 wymtidy.init();wym.hovertools();}, postInitDialog:function (wym, wdw) {var body = wdw.document.body;var sSelectLink = "<div class='row row-indent'><select class='wym_select_link'><option selected value='WYMeditor http://www.wymeditor.org/'>WYMeditor</option><option value='SourceForge http://www.sourceforge.net/'>SourceForge</option><option value='GNU http://www.gnu.org/'>GNU</option></select><input class='wym_choose' type='button' value='{Choose}' /></div>";35 $j(body).filter(".wym_dialog_link").find("fieldset").eq(0).prepend(wym.replaceStrings(sSelectLink));36 $j(body).find(".wym_choose").click(function () {var sVal = $j(body).find(".wym_select_link").val();37 $j(body).find(".wym_href").val(sVal.substring(sVal.lastIndexOf(" ") + 1));38 $j(body).find(".wym_title").val(sVal.substr(0, sVal.lastIndexOf(" ")));});}39 });40 4 41 $ j(".wymsubmit").click(function () {alert($j(this).siblings(".wymeditor").val());});42 5 $(".rte").jTagEditor({ tagSet:"/js/jtageditor.full/html/html-tags.js" }); 6 43 7 $j(".tags").autocomplete("/tags/autocomplete", { multiple: true, mustMatch: false }); 44 8 … … 52 16 53 17 $j('.jd_menu').jdMenu(); 54 55 $j('#login').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' }); 56 $j('#admin-tabs').tabs({ remote: true, fxFade: true, fxSpeed: 'normal' }); 57 18 58 19 $j('form#PostAddForm').ajaxForm({success: showResponse}); 59 20 function showResponse(){ … … 76 37 $j('tr:odd').addClass("odd"); 77 38 78 $j('div#accessibility').draggable({handle: "span.aheader", containment: "document", opacity: 0.4 ,revert: false});39 /*$j('div#accessibility').draggable({handle: "span.aheader", containment: "document", opacity: 0.4 ,revert: false});*/ 79 40 80 41 });