Browse Source

添加视屏、行高插件,添加分类页面

温红权 6 years ago
parent
commit
80c5340da8
34 changed files with 2170 additions and 42 deletions
  1. 34 34
      .classpath
  2. 1 0
      .settings/org.eclipse.core.resources.prefs
  3. 2 0
      .settings/org.eclipse.core.runtime.prefs
  4. 2 0
      .settings/org.eclipse.jdt.core.prefs
  5. 29 0
      src/main/java/cn/com/liandisys/ycjt/ggcx/admin/controller/cms/ArticleController.java
  6. 21 0
      src/main/java/cn/com/liandisys/ycjt/ggcx/admin/dao/cms/CommentDao.java
  7. 88 0
      src/main/java/cn/com/liandisys/ycjt/ggcx/admin/model/cms/AppUser.java
  8. 110 0
      src/main/java/cn/com/liandisys/ycjt/ggcx/admin/model/cms/Comment.java
  9. 20 0
      src/main/java/cn/com/liandisys/ycjt/ggcx/admin/service/cms/ArticleService.java
  10. 2 0
      src/main/java/cn/com/liandisys/ycjt/ggcx/admin/service/cms/CategoryService.java
  11. 1 1
      src/main/java/cn/com/liandisys/ycjt/ggcx/controller/CmsFrontController.java
  12. 5 3
      src/main/webapp/WEB-INF/views/admin/cms/articleList.jsp
  13. 44 0
      src/main/webapp/WEB-INF/views/admin/cms/articlecomment.jsp
  14. 17 2
      src/main/webapp/WEB-INF/views/admin/cms/categoryForm.jsp
  15. 1 0
      src/main/webapp/WEB-INF/views/admin/cms/categoryList.jsp
  16. 2 2
      src/main/webapp/assets/admin/ckeditor/config.js
  17. 71 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/.svn/entries
  18. 231 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/.svn/text-base/plugin.js.svn-base
  19. 62 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/dialogs/.svn/entries
  20. 351 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/dialogs/.svn/text-base/video.js.svn-base
  21. 351 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/dialogs/video.js
  22. 96 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/docs/.svn/entries
  23. 79 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/docs/.svn/text-base/install.html.svn-base
  24. 67 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/docs/.svn/text-base/styles.css.svn-base
  25. 79 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/docs/install.html
  26. 67 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/docs/styles.css
  27. 96 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/entries
  28. 5 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/prop-base/icon.png.svn-base
  29. 5 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/prop-base/placeholder.png.svn-base
  30. BIN
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/text-base/icon.png.svn-base
  31. BIN
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/text-base/placeholder.png.svn-base
  32. BIN
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/icon.png
  33. BIN
      src/main/webapp/assets/admin/ckeditor/plugins/video/images/placeholder.png
  34. 231 0
      src/main/webapp/assets/admin/ckeditor/plugins/video/plugin.js

+ 34 - 34
.classpath

@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java">
-		<attributes>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
-		<attributes>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
-		<attributes>
-			<attribute name="test" value="true"/>
-			<attribute name="optional" value="true"/>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
-		<attributes>
-			<attribute name="maven.pomderived" value="true"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
-		<attributes>
-			<attribute name="maven.pomderived" value="true"/>
-			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="test" value="true"/>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

+ 1 - 0
.settings/org.eclipse.core.resources.prefs

@@ -1,3 +1,4 @@
 eclipse.preferences.version=1
 encoding//src/main/java=UTF-8
 encoding//src/test/java=UTF-8
+separateDerivedEncodings=true

+ 2 - 0
.settings/org.eclipse.core.runtime.prefs

@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\r\n

+ 2 - 0
.settings/org.eclipse.jdt.core.prefs

@@ -3,7 +3,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
 org.eclipse.jdt.core.compiler.compliance=1.7
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
 org.eclipse.jdt.core.compiler.release=disabled
 org.eclipse.jdt.core.compiler.source=1.7

+ 29 - 0
src/main/java/cn/com/liandisys/ycjt/ggcx/admin/controller/cms/ArticleController.java

@@ -20,6 +20,7 @@ import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -29,6 +30,7 @@ import com.google.common.collect.Maps;
 
 import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Article;
 import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Category;
+import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Comment;
 import cn.com.liandisys.ycjt.ggcx.admin.service.cms.ArticleService;
 import cn.com.liandisys.ycjt.ggcx.admin.service.cms.CategoryService;
 import cn.com.liandisys.ycjt.ggcx.admin.service.cms.FileTplService;
@@ -270,6 +272,33 @@ public class ArticleController {
             return new Article();
         }
     }
+    
+    @RequestMapping("/comment/{articleid}")
+    public String comment(Model model,@PathVariable String articleid) {
+
+    	List<Comment> comments = articleService.findCommentsByAid(articleid);
+//    	articleService
+    	model.addAttribute("comments", comments);
+    	model.addAttribute("articleid", articleid);
+        
+        return "admin/cms/articlecomment";
+    }
+    
+    @RequestMapping("/comment/{articleid}/{commentid}/{ishow}")
+    public String commentshow(Model model,@PathVariable String articleid,@PathVariable String commentid,@PathVariable String ishow) {
+
+    	Comment c = new Comment();
+    	c.setId(commentid);
+        c.setIsshow(ishow); 
+        articleService.updateCommentByid(c);
+    	
+    	List<Comment> comments = articleService.findCommentsByAid(articleid);
+//    	articleService
+    	model.addAttribute("comments", comments);
+        
+        return "admin/cms/articlecomment";
+    }
+    
 
     /**
      * 分页信息获取

+ 21 - 0
src/main/java/cn/com/liandisys/ycjt/ggcx/admin/dao/cms/CommentDao.java

@@ -0,0 +1,21 @@
+package cn.com.liandisys.ycjt.ggcx.admin.dao.cms;
+
+import java.util.List;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+
+import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Article;
+import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Comment;
+
+/**
+ * 文章实体的DAO interface.
+ * @author jiangchao
+ * @version 2016-11-29
+ */
+public interface CommentDao extends JpaRepository<Comment, String>, JpaSpecificationExecutor<Comment> {
+
+	
+	List<Comment> findCommentsByArticleId(String articleId);
+
+}

+ 88 - 0
src/main/java/cn/com/liandisys/ycjt/ggcx/admin/model/cms/AppUser.java

@@ -0,0 +1,88 @@
+package cn.com.liandisys.ycjt.ggcx.admin.model.cms;
+
+import java.io.Serializable;
+import java.sql.Blob;
+import java.util.Date;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import cn.com.liandisys.ycjt.ggcx.admin.model.User;
+
+@Entity
+@Table(name = "T_APP_USER")
+public class AppUser implements Serializable  {
+	private static final long serialVersionUID = -1L;
+	    
+	   @Id
+       @Column(name="id")
+	    private Integer id;
+	    
+	   @Column(name="username")
+	    private String username;
+	    
+
+	    @Column(name="password")
+	    private String password;
+	    
+	    @Column(name="mobile")
+	    private String mobile;
+	    
+
+	    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
+		@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
+	    @Column(name="updatetime")
+		private Date updatetime;
+
+		public Integer getId() {
+			return id;
+		}
+
+		public void setId(Integer id) {
+			this.id = id;
+		}
+
+		
+
+		public String getUsername() {
+			return username;
+		}
+
+		public void setUsername(String username) {
+			this.username = username;
+		}
+
+		public String getPassword() {
+			return password;
+		}
+
+		public void setPassword(String password) {
+			this.password = password;
+		}
+
+		public String getMobile() {
+			return mobile;
+		}
+
+		public void setMobile(String mobile) {
+			this.mobile = mobile;
+		}
+
+		
+
+		public Date getUpdatetime() {
+			return updatetime;
+		}
+
+		public void setUpdatetime(Date updatetime) {
+			this.updatetime = updatetime;
+		}
+		    
+	    
+
+}

+ 110 - 0
src/main/java/cn/com/liandisys/ycjt/ggcx/admin/model/cms/Comment.java

@@ -0,0 +1,110 @@
+package cn.com.liandisys.ycjt.ggcx.admin.model.cms;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import cn.com.liandisys.ycjt.ggcx.admin.model.User;
+
+@Entity
+@Table(name = "T_APP_COMMENTS_COLLECTION")
+public class Comment implements Serializable  {
+	private static final long serialVersionUID = -1L;
+	    
+	   @Id
+       @GeneratedValue(generator = "system-uuid")
+       @GenericGenerator(name = "system-uuid", strategy = "uuid")
+       @Column(name="id")
+	    private String id;
+	    
+	    @ManyToOne(fetch = FetchType.EAGER, targetEntity = AppUser.class)
+		@JoinColumn(name = "user_id")
+	    private AppUser userId;
+	    
+
+	    @Column(name="article_id")
+	    private String articleId;
+	    
+	    @Column(name="content")
+	    private String content;
+	    
+	    @Column(name="isshow")
+	    private String isshow;
+
+	    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
+		@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
+	    @Column(name="inserttime")
+		private Date inserttime;
+		
+
+		
+
+		public String getIsshow() {
+			return isshow;
+		}
+
+		public void setIsshow(String isshow) {
+			this.isshow = isshow;
+		}
+
+		public String getId() {
+			return id;
+		}
+
+		public void setId(String id) {
+			this.id = id;
+		}
+
+		public AppUser getUserId() {
+			return userId;
+		}
+
+		public void setUserId(AppUser userId) {
+			this.userId = userId;
+		}
+
+		public String getArticleId() {
+			return articleId;
+		}
+
+		public void setArticleId(String articleId) {
+			this.articleId = articleId;
+		}
+
+		
+
+		public String getContent() {
+			return content;
+		}
+
+		public void setContent(String content) {
+			this.content = content;
+		}
+
+		public Date getInserttime() {
+			return inserttime;
+		}
+
+		public void setInserttime(Date inserttime) {
+			this.inserttime = inserttime;
+		}
+
+		
+
+		
+
+		
+		
+
+	    
+	    
+	    
+
+}

+ 20 - 0
src/main/java/cn/com/liandisys/ycjt/ggcx/admin/service/cms/ArticleService.java

@@ -17,8 +17,10 @@ import com.google.common.collect.Lists;
 
 import cn.com.liandisys.ycjt.ggcx.admin.dao.cms.ArticleDao;
 import cn.com.liandisys.ycjt.ggcx.admin.dao.cms.ArticleDataDao;
+import cn.com.liandisys.ycjt.ggcx.admin.dao.cms.CommentDao;
 import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Article;
 import cn.com.liandisys.ycjt.ggcx.admin.model.cms.ArticleData;
+import cn.com.liandisys.ycjt.ggcx.admin.model.cms.Comment;
 import cn.com.liandisys.ycjt.ggcx.admin.utils.CacheUtils;
 import cn.com.liandisys.ycjt.ggcx.admin.utils.CmsUtils;
 import cn.com.liandisys.ycjt.ggcx.common.util.StringUtils;
@@ -38,6 +40,9 @@ public class ArticleService {
 
     @Autowired
     private ArticleDataDao articleDataDao;
+    
+    @Autowired
+    private CommentDao commentDao;
 
     public Article findOne(String id) {
 
@@ -132,5 +137,20 @@ public class ArticleService {
 
         return articleDao.findByCategoryId(categoryId);
     }
+    
+
+    public List<Comment> findCommentsByAid(String articleId) {
+
+        return commentDao.findCommentsByArticleId(articleId);
+    }
+    
+    @Transactional(readOnly = false)
+    public void updateCommentByid(Comment comment) {
+    	
+    	Comment p =  commentDao.getOne(comment.getId());
+    	p.setIsshow(comment.getIsshow());
+
+         commentDao.save(p);
+    }
 
 }

+ 2 - 0
src/main/java/cn/com/liandisys/ycjt/ggcx/admin/service/cms/CategoryService.java

@@ -1,5 +1,6 @@
 package cn.com.liandisys.ycjt.ggcx.admin.service.cms;
 
+import java.util.Date;
 import java.util.List;
 
 import org.apache.commons.lang3.StringEscapeUtils;
@@ -34,6 +35,7 @@ public class CategoryService {
 
 	@Transactional(readOnly = false)
 	public void save(Category category) {
+		category.setCreateDate(new Date());
 		if (StringUtils.isNotBlank(category.getViewConfig())){
             category.setViewConfig(StringEscapeUtils.unescapeHtml4(category.getViewConfig()));
         }

+ 1 - 1
src/main/java/cn/com/liandisys/ycjt/ggcx/controller/CmsFrontController.java

@@ -152,7 +152,7 @@ public class CmsFrontController {
         }
         // 鑾峰彇鏂囩珷鍐呭
         Article article = articleService.findOne(contentId);
-        if (article == null || !Article.DEL_FLAG_NORMAL.equals(article.getDelFlag())) {
+        if (article == null || Article.DEL_FLAG_NORMAL.equals(article.getDelFlag())) {
             return "error/404";
         }
         String copyfrom = article.getArticleData().getCopyfrom();

+ 5 - 3
src/main/webapp/WEB-INF/views/admin/cms/articleList.jsp

@@ -63,9 +63,11 @@
     				<a href="${ctx}/cms/article/form?id=${article.id}&TempcategoryId=${categoryId}">修改</a>
 					<a href="${ctx}/cms/article/delete?id=${article.id}&categoryId=${article.category.id}" onclick="return confirmx('确认要删除该文章吗?', this.href)" >删除</a>
 					<c:if test="${article.delFlag eq 1 && user.loginName!='ycjtj'}">
-					
-				<a href="${ctx}/cms/article/publish?id=${article.id}&categoryId=${article.category.id}" onclick="return confirmx('确认要发布该文章吗?', this.href)" >发布</a>
-				</c:if>
+				       <a href="${ctx}/cms/article/publish?id=${article.id}&categoryId=${article.category.id}" onclick="return confirmx('确认要发布该文章吗?', this.href)" >发布</a>     
+				   </c:if>
+				   <c:if test="${user.loginName!='ycjtj'}">
+				       <a href="${ctx}/cms/article/comment/${article.id}">评论管理</a>
+				   </c:if>
 					
 				</td>
 			</tr>

+ 44 - 0
src/main/webapp/WEB-INF/views/admin/cms/articlecomment.jsp

@@ -0,0 +1,44 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/admin/include/taglib.jsp"%>
+<html>
+<head>
+	<title>评论管理</title>
+	<meta name="decorator" content="default"/>
+	<%@include file="/WEB-INF/views/admin/include/treetable.jsp" %>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$("#treeTable").treeTable({expandLevel : 3});
+		});
+    	function updateSort() {
+			loading('正在提交,请稍等...');
+	    	$("#listForm").attr("action", "${ctx}/cms/category/updateSort");
+	    	$("#listForm").submit();
+    	}
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/cms/category/list">评论管理</a></li>
+	</ul>
+	<div>
+	  <table id="contentTable" class="table table-striped table-bordered table-condensed">
+	     <thead><tr><th>用户手机号</th><th>评论内容</th><th>评论时间</th><th>是否显示</th><th>操作</th></tr></thead>
+	     <tbody>
+	    <c:forEach items="${comments}" var="comment">
+	      <tr>
+	        <td>${comment.userId.mobile }</td>
+	        <td>${comment.content }</td>
+	        <td>${comment.inserttime }</td>
+	       <td>${comment.isshow eq "0"?"否":"是"}</td>
+	        <td><a href="${ctx}/cms/article/comment/${articleid}/${comment.id}/1"  >显示</a>
+			    <a href="${ctx}/cms/article/comment/${articleid}/${comment.id}/0"  >隐藏</a>     
+			 </td>
+	      </tr>
+	  
+	  </c:forEach>
+	  </tbody>
+	  </table>
+	</div>
+	
+</body>
+</html>

+ 17 - 2
src/main/webapp/WEB-INF/views/admin/cms/categoryForm.jsp

@@ -82,13 +82,28 @@
 				<span class="help-inline">填写描述及关键字,有助于搜索引擎优化</span>
 			</div>
 		</div>
-		<%-- <div class="control-group">
+		 <div class="control-group">
 			<label class="control-label">排序:</label>
 			<div class="controls">
 				<form:input path="sort" htmlEscape="false" maxlength="11" class="required digits"/>
 				<span class="help-inline">栏目的排列次序</span>
 			</div>
-		</div> --%>
+		</div> 
+		
+		
+		<div class="control-group">
+			<label class="control-label">图片:</label>
+			<div class="controls">
+                <input type="hidden" id="image" name="image" value="${category.image}" />
+                <div>
+                <div style="float:left">
+				<sys:ckfinder input="image" type="images" uploadPath="/cms/article" selectMultiple="false"/>
+				</div>
+				<!--<p style="float:left;float: left;margin-top: 42px;margin-left: 20px;color: red;">*仅供图片专栏使用</p>-->
+				</div>
+			</div>
+		</div>
+		
 		<!-- 
 		<div class="control-group">
 			<label class="control-label">自定义列表视图:</label>

+ 1 - 0
src/main/webapp/WEB-INF/views/admin/cms/categoryList.jsp

@@ -19,6 +19,7 @@
 <body>
 	<ul class="nav nav-tabs">
 		<li class="active"><a href="${ctx}/cms/category/list">栏目列表</a></li>
+		<li class=""><a href="${ctx}/cms/category/form">新增栏目</a></li>
 	</ul>
 	<sys:message content="${message}"/>
 	<form id="listForm" method="post">

+ 2 - 2
src/main/webapp/assets/admin/ckeditor/config.js

@@ -13,7 +13,7 @@ CKEDITOR.editorConfig = function( config ) {
 	config.disableNativeSpellChecker = false;
 	config.resize_dir = 'vertical';
 	config.keystrokes =[[ CKEDITOR.CTRL + 13 /*Enter*/, 'maximize' ]];	
-	config.extraPlugins = 'tableresize,lineheight';
+	config.extraPlugins = 'tableresize,lineheight,video';
 	config.enterMode = CKEDITOR.ENTER_P;
 	config.shiftEnterMode = CKEDITOR.ENTER_BR;
 	config.font_names='宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;微软雅黑/微软雅黑;'+ config.font_names;
@@ -21,7 +21,7 @@ CKEDITOR.editorConfig = function( config ) {
 	config.toolbar_default = [
 		['Source','-','Templates','Preview'],
 	    ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'],
-	    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['ShowBlocks'],['Image','Capture','Flash'],['Maximize'],
+	    ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['ShowBlocks'],['Image','Capture','Flash','Video'],['Maximize'],
 	    '/',
 	    ['Bold','Italic','Underline','Strike','-'],
 	    ['Subscript','Superscript','-'],

+ 71 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/.svn/entries

@@ -0,0 +1,71 @@
+10
+
+dir
+3330
+svn://192.168.99.246/java_repos/ewj_market/WebRoot/ckeditor/plugins/video
+svn://192.168.99.246/java_repos
+
+
+
+2014-04-15T06:25:45.643661Z
+3330
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+f5ac1bad-8383-49da-a5f2-7580d15a88e7
+
+dialogs
+dir
+
+images
+dir
+
+docs
+dir
+
+plugin.js
+file
+3336
+
+
+
+2014-04-15T07:32:43.859375Z
+f127e1f93ba73a42a8d474ad20a5d6a3
+2014-04-15T07:40:07.042157Z
+3336
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+6298
+

+ 231 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/.svn/text-base/plugin.js.svn-base

@@ -0,0 +1,231 @@
+/*
+ * @file Video plugin for CKEditor
+ * Copyright (C) 2011 Alfonso Martínez de Lizarrondo
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ */
+
+( function() {
+
+CKEDITOR.plugins.add( 'video',
+{
+	// Translations, available at the end of this file, without extra requests
+	lang : [ 'en', 'es' ],
+
+	getPlaceholderCss : function()
+	{
+		return 'img.cke_video' +
+				'{' +
+					'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
+					'background-position: center center;' +
+					'background-repeat: no-repeat;' +
+					'background-color:gray;'+
+					'border: 1px solid #a9a9a9;' +
+					'width: 80px;' +
+					'height: 80px;' +
+				'}';
+	},
+
+	onLoad : function()
+	{
+		// v4
+		if (CKEDITOR.addCss)
+			CKEDITOR.addCss( this.getPlaceholderCss() );
+
+	},
+
+	init : function( editor )
+	{
+	
+		 var b = "video[controls,id,height,poster,width];source[src,type]";
+		var lang = editor.lang.video;
+
+		// Check for CKEditor 3.5
+		if (typeof editor.element.data == 'undefined')
+		{
+			alert('The "video" plugin requires CKEditor 3.5 or newer');
+			return;
+		}
+
+		CKEDITOR.dialog.add( 'video', this.path + 'dialogs/video.js' );
+
+		editor.addCommand( 'Video', new CKEDITOR.dialogCommand( 'video', {
+            allowedContent: b,
+            requiredContent: "video"
+        } ) );
+		editor.ui.addButton( 'Video',
+			{
+				label : lang.toolbar,
+				command : 'Video',
+				icon : this.path + 'images/icon.png'
+			} );
+
+		// v3
+		if (editor.addCss)
+			editor.addCss( this.getPlaceholderCss() );
+
+
+		// If the "menu" plugin is loaded, register the menu items.
+		if ( editor.addMenuItems )
+		{
+			editor.addMenuItems(
+				{
+					video :
+					{
+						label : lang.properties,
+						command : 'Video',
+						group : 'flash'
+					}
+				});
+		}
+
+		editor.on( 'doubleclick', function( evt )
+			{
+				var element = evt.data.element;
+
+				if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'video' )
+					evt.data.dialog = 'video';
+			});
+
+		// If the "contextmenu" plugin is loaded, register the listeners.
+		if ( editor.contextMenu )
+		{
+			editor.contextMenu.addListener( function( element, selection )
+				{
+					if ( element && element.is( 'img' ) && !element.isReadOnly()
+							&& element.data( 'cke-real-element-type' ) == 'video' )
+						return { video : CKEDITOR.TRISTATE_OFF };
+				});
+		}
+
+		// Add special handling for these items
+		CKEDITOR.dtd.$empty['cke:source']=1;
+		CKEDITOR.dtd.$empty['source']=1;
+
+		editor.lang.fakeobjects.video = lang.fakeObject;
+
+
+	}, //Init
+
+	afterInit: function( editor )
+	{
+		var dataProcessor = editor.dataProcessor,
+			htmlFilter = dataProcessor && dataProcessor.htmlFilter,
+			dataFilter = dataProcessor && dataProcessor.dataFilter;
+
+		// dataFilter : conversion from html input to internal data
+		dataFilter.addRules(
+			{
+
+			elements : {
+				$ : function( realElement )
+				{
+						if ( realElement.name == 'video' )
+						{
+							realElement.name = 'cke:video';
+							for( var i=0; i < realElement.children.length; i++)
+							{
+								if ( realElement.children[ i ].name == 'source' )
+									realElement.children[ i ].name = 'cke:source'
+							}
+
+							var fakeElement = editor.createFakeParserElement( realElement, 'cke_video', 'video', false ),
+								fakeStyle = fakeElement.attributes.style || '';
+
+							var width = realElement.attributes.width,
+								height = realElement.attributes.height,
+								poster = realElement.attributes.poster;
+
+							if ( typeof width != 'undefined' )
+								fakeStyle = fakeElement.attributes.style = fakeStyle + 'width:' + CKEDITOR.tools.cssLength( width ) + ';';
+
+							if ( typeof height != 'undefined' )
+								fakeStyle = fakeElement.attributes.style = fakeStyle + 'height:' + CKEDITOR.tools.cssLength( height ) + ';';
+
+							if ( poster )
+								fakeStyle = fakeElement.attributes.style = fakeStyle + 'background-image:url(' + poster + ');';
+
+							return fakeElement;
+						}
+				}
+			}
+
+			}
+		);
+
+	} // afterInit
+
+} ); // plugins.add
+
+
+var en = {
+		toolbar	: 'Video',
+		dialogTitle : 'Video properties',
+		fakeObject : 'Video',
+		properties : 'Edit video',
+		widthRequired : 'Width field cannot be empty',
+		heightRequired : 'Height field cannot be empty',
+		poster: 'Poster image',
+		sourceVideo: 'Source video',
+		sourceType : 'Video type',
+		linkTemplate :  '<a href="%src%">%type%</a> ',
+		fallbackTemplate : 'Your browser doesn\'t support video.<br>Please download the file: %links%'
+	};
+var cn = {
+		toolbar	: '视频',
+		dialogTitle : '视频属性',
+		fakeObject : '视频',
+		properties : '编辑视频',
+		widthRequired : '宽度不能为空',
+		heightRequired : '高度不能为空',
+		poster: '海报图像',
+		sourceVideo: '视频地址',
+		sourceType : '视频类型',
+		linkTemplate :  '<a href="%src%">%type%</a> ',
+		fallbackTemplate : '你的浏览器不支持此播放器.<br>请直接下载文件: %links%'
+};
+
+var es = {
+		toolbar	: 'Video',
+		dialogTitle : 'Propiedades de video',
+		fakeObject : 'Video',
+		properties : 'Editar el video',
+		widthRequired : 'La anchura no se puede dejar en blanco',
+		heightRequired : 'La altura no se puede dejar en blanco',
+		poster: 'Imagen de presentación',
+		sourceVideo: 'Archivo de video',
+		sourceType : 'Tipo',
+		linkTemplate :  '<a href="%src%">%type%</a> ',
+		fallbackTemplate : 'Su navegador no soporta VIDEO.<br>Por favor, descargue el fichero: %links%'
+	};
+
+	// v3
+	if (CKEDITOR.skins)
+	{
+		en = { video : en} ;
+		es = { video : es} ;
+		cn = { video : cn} ;
+	}
+
+// Translations
+CKEDITOR.plugins.setLang( 'video', 'en', en );
+
+CKEDITOR.plugins.setLang( 'video', 'es', es );
+CKEDITOR.plugins.setLang( 'video', 'zh-cn', cn );
+
+})();

+ 62 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/dialogs/.svn/entries

@@ -0,0 +1,62 @@
+10
+
+dir
+3331
+svn://192.168.99.246/java_repos/ewj_market/WebRoot/ckeditor/plugins/video/dialogs
+svn://192.168.99.246/java_repos
+
+
+
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+f5ac1bad-8383-49da-a5f2-7580d15a88e7
+
+video.js
+file
+
+
+
+
+2014-04-15T05:57:22.296875Z
+2ffe727f7fa70749cf0f1296a76014cb
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+9219
+

+ 351 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/dialogs/.svn/text-base/video.js.svn-base

@@ -0,0 +1,351 @@
+CKEDITOR.dialog.add( 'video', function ( editor )
+{
+	var lang = editor.lang.video;
+
+	function commitValue( videoNode, extraStyles )
+	{
+		var value=this.getValue();
+
+		if ( !value && this.id=='id' )
+			value = generateId();
+
+		videoNode.setAttribute( this.id, value);
+
+		if ( !value )
+			return;
+		switch( this.id )
+		{
+			case 'poster':
+				extraStyles.backgroundImage = 'url(' + value + ')';
+				break;
+			case 'width':
+				extraStyles.width = value + 'px';
+				break;
+			case 'height':
+				extraStyles.height = value + 'px';
+				break;
+		}
+	}
+
+	function commitSrc( videoNode, extraStyles, videos )
+	{
+		var match = this.id.match(/(\w+)(\d)/),
+			id = match[1],
+			number = parseInt(match[2], 10);
+
+		var video = videos[number] || (videos[number]={});
+		video[id] = this.getValue();
+	}
+
+	function loadValue( videoNode )
+	{
+		if ( videoNode )
+			this.setValue( videoNode.getAttribute( this.id ) );
+		else
+		{
+			if ( this.id == 'id')
+				this.setValue( generateId() );
+		}
+	}
+
+	function loadSrc( videoNode, videos )
+	{
+		var match = this.id.match(/(\w+)(\d)/),
+			id = match[1],
+			number = parseInt(match[2], 10);
+
+		var video = videos[number];
+		if (!video)
+			return;
+		this.setValue( video[ id ] );
+	}
+
+	function generateId()
+	{
+		var now = new Date();
+		return 'video' + now.getFullYear() + now.getMonth() + now.getDate() + now.getHours() + now.getMinutes() + now.getSeconds();
+	}
+
+	// To automatically get the dimensions of the poster image
+	var onImgLoadEvent = function()
+	{
+		// Image is ready.
+		var preview = this.previewImage;
+		preview.removeListener( 'load', onImgLoadEvent );
+		preview.removeListener( 'error', onImgLoadErrorEvent );
+		preview.removeListener( 'abort', onImgLoadErrorEvent );
+
+		this.setValueOf( 'info', 'width', preview.$.width );
+		this.setValueOf( 'info', 'height', preview.$.height );
+	};
+
+	var onImgLoadErrorEvent = function()
+	{
+		// Error. Image is not loaded.
+		var preview = this.previewImage;
+		preview.removeListener( 'load', onImgLoadEvent );
+		preview.removeListener( 'error', onImgLoadErrorEvent );
+		preview.removeListener( 'abort', onImgLoadErrorEvent );
+	};
+
+	return {
+		title : lang.dialogTitle,
+		minWidth : 400,
+		minHeight : 200,
+
+		onShow : function()
+		{
+			// Clear previously saved elements.
+			this.fakeImage = this.videoNode = null;
+			// To get dimensions of poster image
+			this.previewImage = editor.document.createElement( 'img' );
+
+			var fakeImage = this.getSelectedElement();
+			if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'video' )
+			{
+				this.fakeImage = fakeImage;
+
+				var videoNode = editor.restoreRealElement( fakeImage ),
+					videos = [],
+					sourceList = videoNode.getElementsByTag( 'source', '' );
+				if (sourceList.count()==0)
+					sourceList = videoNode.getElementsByTag( 'source', 'cke' );
+
+				for ( var i = 0, length = sourceList.count() ; i < length ; i++ )
+				{
+					var item = sourceList.getItem( i );
+					videos.push( {src : item.getAttribute( 'src' ), type: item.getAttribute( 'type' )} );
+				}
+
+				this.videoNode = videoNode;
+
+				this.setupContent( videoNode, videos );
+			}
+			else
+				this.setupContent( null, [] );
+		},
+
+		onOk : function()
+		{
+			// If there's no selected element create one. Otherwise, reuse it
+			var videoNode = null;
+			if ( !this.fakeImage )
+			{
+				videoNode = CKEDITOR.dom.element.createFromHtml( '<cke:video></cke:video>', editor.document );
+				videoNode.setAttributes(
+					{
+						controls : 'controls'
+					} );
+			}
+			else
+			{
+				videoNode = this.videoNode;
+			}
+
+			var extraStyles = {}, videos = [];
+			this.commitContent( videoNode, extraStyles, videos );
+
+			var innerHtml = '', links = '',
+				link = lang.linkTemplate || '',
+				fallbackTemplate = lang.fallbackTemplate || '';
+			for(var i=0; i<videos.length; i++)
+			{
+				var video = videos[i];
+				if ( !video || !video.src )
+					continue;
+				innerHtml += '<cke:source src="' + video.src + '" type="' + video.type + '" />';
+				
+				links += link.replace('%src%', video.src).replace('%type%', video.type);
+			}
+			videoNode.setHtml( innerHtml + fallbackTemplate.replace( '%links%', links ) );
+
+			// Refresh the fake image.
+			var newFakeImage = editor.createFakeElement( videoNode, 'cke_video', 'video', false );
+			newFakeImage.setStyles( extraStyles );
+			if ( this.fakeImage )
+			{
+				newFakeImage.replace( this.fakeImage );
+				editor.getSelection().selectElement( newFakeImage );
+			}
+			else
+			{
+				// Insert it in a div
+				var div = new CKEDITOR.dom.element( 'DIV', editor.document );
+				editor.insertElement( div );
+				div.append( newFakeImage );
+			}
+		},
+		onHide : function()
+		{
+			if ( this.previewImage )
+			{
+				this.previewImage.removeListener( 'load', onImgLoadEvent );
+				this.previewImage.removeListener( 'error', onImgLoadErrorEvent );
+				this.previewImage.removeListener( 'abort', onImgLoadErrorEvent );
+				this.previewImage.remove();
+				this.previewImage = null;		// Dialog is closed.
+			}
+		},
+
+		contents :
+		[
+			{
+				id : 'info',
+				elements :
+				[
+					{
+						type : 'hbox',
+						widths: [ '', '100px'],
+						children : [
+							{
+								type : 'text',
+								id : 'poster',
+								label : lang.poster,
+								commit : commitValue,
+								setup : loadValue,
+								onChange : function()
+								{
+									var dialog = this.getDialog(),
+										newUrl = this.getValue();
+
+									//Update preview image
+									if ( newUrl.length > 0 )	//Prevent from load before onShow
+									{
+										dialog = this.getDialog();
+										var preview = dialog.previewImage;
+
+										preview.on( 'load', onImgLoadEvent, dialog );
+										preview.on( 'error', onImgLoadErrorEvent, dialog );
+										preview.on( 'abort', onImgLoadErrorEvent, dialog );
+										preview.setAttribute( 'src', newUrl );
+									}
+								}
+							},
+							{
+								type : 'button',
+								id : 'browse',
+								hidden : 'true',
+								style : 'display:inline-block;margin-top:10px;',
+								filebrowser :
+								{
+									action : 'Browse',
+									target: 'info:poster',
+									url: editor.config.filebrowserImageBrowseUrl || editor.config.filebrowserBrowseUrl
+								},
+								label : editor.lang.common.browseServer
+							}]
+					},
+					{
+						type : 'hbox',
+						widths: [ '33%', '33%', '33%'],
+						children : [
+							{
+								type : 'text',
+								id : 'width',
+								label : editor.lang.common.width,
+								'default' : 400,
+								validate : CKEDITOR.dialog.validate.notEmpty( lang.widthRequired ),
+								commit : commitValue,
+								setup : loadValue
+							},
+							{
+								type : 'text',
+								id : 'height',
+								label : editor.lang.common.height,
+								'default' : 300,
+								validate : CKEDITOR.dialog.validate.notEmpty(lang.heightRequired ),
+								commit : commitValue,
+								setup : loadValue
+							},
+							{
+								type : 'text',
+								id : 'id',
+								label : 'Id',
+								commit : commitValue,
+								setup : loadValue
+							}
+								]
+					},
+					{
+						type : 'hbox',
+						widths: [ '', '100px', '75px'],
+						children : [
+							{
+								type : 'text',
+								id : 'src0',
+								label : lang.sourceVideo,
+								commit : commitSrc,
+								setup : loadSrc
+							},
+							{
+								type : 'button',
+								id : 'browse',
+								hidden : 'true',
+								style : 'display:inline-block;margin-top:10px;',
+								filebrowser :
+								{
+									action : 'Browse',
+									target: 'info:src0',
+									url: editor.config.filebrowserVideoBrowseUrl || editor.config.filebrowserBrowseUrl
+								},
+								label : editor.lang.common.browseServer
+							},
+							{
+								id : 'type0',
+								label : lang.sourceType,
+								type : 'select',
+								'default' : 'video/mp4',
+								items :
+								[
+									[ 'MP4', 'video/mp4' ],
+									[ 'WebM', 'video/webm' ]
+								],
+								commit : commitSrc,
+								setup : loadSrc
+							}]
+					},
+
+					{
+						type : 'hbox',
+						widths: [ '', '100px', '75px'],
+						children : [
+							{
+								type : 'text',
+								id : 'src1',
+								label : lang.sourceVideo,
+								commit : commitSrc,
+								setup : loadSrc
+							},
+							{
+								type : 'button',
+								id : 'browse',
+								hidden : 'true',
+								style : 'display:inline-block;margin-top:10px;',
+								filebrowser :
+								{
+									action : 'Browse',
+									target: 'info:src1',
+									url: editor.config.filebrowserVideoBrowseUrl || editor.config.filebrowserBrowseUrl
+								},
+								label : editor.lang.common.browseServer
+							},
+							{
+								id : 'type1',
+								label : lang.sourceType,
+								type : 'select',
+								'default':'video/webm',
+								items :
+								[
+									[ 'MP4', 'video/mp4' ],
+									[ 'WebM', 'video/webm' ]
+								],
+								commit : commitSrc,
+								setup : loadSrc
+							}]
+					}
+				]
+			}
+
+		]
+	};
+} );

+ 351 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/dialogs/video.js

@@ -0,0 +1,351 @@
+CKEDITOR.dialog.add( 'video', function ( editor )
+{
+	var lang = editor.lang.video;
+
+	function commitValue( videoNode, extraStyles )
+	{
+		var value=this.getValue();
+
+		if ( !value && this.id=='id' )
+			value = generateId();
+
+		videoNode.setAttribute( this.id, value);
+
+		if ( !value )
+			return;
+		switch( this.id )
+		{
+			case 'poster':
+				extraStyles.backgroundImage = 'url(' + value + ')';
+				break;
+			case 'width':
+				extraStyles.width = value + 'px';
+				break;
+			case 'height':
+				extraStyles.height = value + 'px';
+				break;
+		}
+	}
+
+	function commitSrc( videoNode, extraStyles, videos )
+	{
+		var match = this.id.match(/(\w+)(\d)/),
+			id = match[1],
+			number = parseInt(match[2], 10);
+
+		var video = videos[number] || (videos[number]={});
+		video[id] = this.getValue();
+	}
+
+	function loadValue( videoNode )
+	{
+		if ( videoNode )
+			this.setValue( videoNode.getAttribute( this.id ) );
+		else
+		{
+			if ( this.id == 'id')
+				this.setValue( generateId() );
+		}
+	}
+
+	function loadSrc( videoNode, videos )
+	{
+		var match = this.id.match(/(\w+)(\d)/),
+			id = match[1],
+			number = parseInt(match[2], 10);
+
+		var video = videos[number];
+		if (!video)
+			return;
+		this.setValue( video[ id ] );
+	}
+
+	function generateId()
+	{
+		var now = new Date();
+		return 'video' + now.getFullYear() + now.getMonth() + now.getDate() + now.getHours() + now.getMinutes() + now.getSeconds();
+	}
+
+	// To automatically get the dimensions of the poster image
+	var onImgLoadEvent = function()
+	{
+		// Image is ready.
+		var preview = this.previewImage;
+		preview.removeListener( 'load', onImgLoadEvent );
+		preview.removeListener( 'error', onImgLoadErrorEvent );
+		preview.removeListener( 'abort', onImgLoadErrorEvent );
+
+		this.setValueOf( 'info', 'width', preview.$.width );
+		this.setValueOf( 'info', 'height', preview.$.height );
+	};
+
+	var onImgLoadErrorEvent = function()
+	{
+		// Error. Image is not loaded.
+		var preview = this.previewImage;
+		preview.removeListener( 'load', onImgLoadEvent );
+		preview.removeListener( 'error', onImgLoadErrorEvent );
+		preview.removeListener( 'abort', onImgLoadErrorEvent );
+	};
+
+	return {
+		title : lang.dialogTitle,
+		minWidth : 400,
+		minHeight : 200,
+
+		onShow : function()
+		{
+			// Clear previously saved elements.
+			this.fakeImage = this.videoNode = null;
+			// To get dimensions of poster image
+			this.previewImage = editor.document.createElement( 'img' );
+
+			var fakeImage = this.getSelectedElement();
+			if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'video' )
+			{
+				this.fakeImage = fakeImage;
+
+				var videoNode = editor.restoreRealElement( fakeImage ),
+					videos = [],
+					sourceList = videoNode.getElementsByTag( 'source', '' );
+				if (sourceList.count()==0)
+					sourceList = videoNode.getElementsByTag( 'source', 'cke' );
+
+				for ( var i = 0, length = sourceList.count() ; i < length ; i++ )
+				{
+					var item = sourceList.getItem( i );
+					videos.push( {src : item.getAttribute( 'src' ), type: item.getAttribute( 'type' )} );
+				}
+
+				this.videoNode = videoNode;
+
+				this.setupContent( videoNode, videos );
+			}
+			else
+				this.setupContent( null, [] );
+		},
+
+		onOk : function()
+		{
+			// If there's no selected element create one. Otherwise, reuse it
+			var videoNode = null;
+			if ( !this.fakeImage )
+			{
+				videoNode = CKEDITOR.dom.element.createFromHtml( '<cke:video></cke:video>', editor.document );
+				videoNode.setAttributes(
+					{
+						controls : 'controls'
+					} );
+			}
+			else
+			{
+				videoNode = this.videoNode;
+			}
+
+			var extraStyles = {}, videos = [];
+			this.commitContent( videoNode, extraStyles, videos );
+
+			var innerHtml = '', links = '',
+				link = lang.linkTemplate || '',
+				fallbackTemplate = lang.fallbackTemplate || '';
+			for(var i=0; i<videos.length; i++)
+			{
+				var video = videos[i];
+				if ( !video || !video.src )
+					continue;
+				innerHtml += '<cke:source src="' + video.src + '" type="' + video.type + '" />';
+				
+				links += link.replace('%src%', video.src).replace('%type%', video.type);
+			}
+			videoNode.setHtml( innerHtml + fallbackTemplate.replace( '%links%', links ) );
+
+			// Refresh the fake image.
+			var newFakeImage = editor.createFakeElement( videoNode, 'cke_video', 'video', false );
+			newFakeImage.setStyles( extraStyles );
+			if ( this.fakeImage )
+			{
+				newFakeImage.replace( this.fakeImage );
+				editor.getSelection().selectElement( newFakeImage );
+			}
+			else
+			{
+				// Insert it in a div
+				var div = new CKEDITOR.dom.element( 'DIV', editor.document );
+				editor.insertElement( div );
+				div.append( newFakeImage );
+			}
+		},
+		onHide : function()
+		{
+			if ( this.previewImage )
+			{
+				this.previewImage.removeListener( 'load', onImgLoadEvent );
+				this.previewImage.removeListener( 'error', onImgLoadErrorEvent );
+				this.previewImage.removeListener( 'abort', onImgLoadErrorEvent );
+				this.previewImage.remove();
+				this.previewImage = null;		// Dialog is closed.
+			}
+		},
+
+		contents :
+		[
+			{
+				id : 'info',
+				elements :
+				[
+					{
+						type : 'hbox',
+						widths: [ '', '100px'],
+						children : [
+							{
+								type : 'text',
+								id : 'poster',
+								label : lang.poster,
+								commit : commitValue,
+								setup : loadValue,
+								onChange : function()
+								{
+									var dialog = this.getDialog(),
+										newUrl = this.getValue();
+
+									//Update preview image
+									if ( newUrl.length > 0 )	//Prevent from load before onShow
+									{
+										dialog = this.getDialog();
+										var preview = dialog.previewImage;
+
+										preview.on( 'load', onImgLoadEvent, dialog );
+										preview.on( 'error', onImgLoadErrorEvent, dialog );
+										preview.on( 'abort', onImgLoadErrorEvent, dialog );
+										preview.setAttribute( 'src', newUrl );
+									}
+								}
+							},
+							{
+								type : 'button',
+								id : 'browse',
+								hidden : 'true',
+								style : 'display:inline-block;margin-top:10px;',
+								filebrowser :
+								{
+									action : 'Browse',
+									target: 'info:poster',
+									url: editor.config.filebrowserImageBrowseUrl || editor.config.filebrowserBrowseUrl
+								},
+								label : editor.lang.common.browseServer
+							}]
+					},
+					{
+						type : 'hbox',
+						widths: [ '33%', '33%', '33%'],
+						children : [
+							{
+								type : 'text',
+								id : 'width',
+								label : editor.lang.common.width,
+								'default' : 400,
+								validate : CKEDITOR.dialog.validate.notEmpty( lang.widthRequired ),
+								commit : commitValue,
+								setup : loadValue
+							},
+							{
+								type : 'text',
+								id : 'height',
+								label : editor.lang.common.height,
+								'default' : 300,
+								validate : CKEDITOR.dialog.validate.notEmpty(lang.heightRequired ),
+								commit : commitValue,
+								setup : loadValue
+							},
+							{
+								type : 'text',
+								id : 'id',
+								label : 'Id',
+								commit : commitValue,
+								setup : loadValue
+							}
+								]
+					},
+					{
+						type : 'hbox',
+						widths: [ '', '100px', '75px'],
+						children : [
+							{
+								type : 'text',
+								id : 'src0',
+								label : lang.sourceVideo,
+								commit : commitSrc,
+								setup : loadSrc
+							},
+							{
+								type : 'button',
+								id : 'browse',
+								hidden : 'true',
+								style : 'display:inline-block;margin-top:10px;',
+								filebrowser :
+								{
+									action : 'Browse',
+									target: 'info:src0',
+									url: editor.config.filebrowserVideoBrowseUrl || editor.config.filebrowserBrowseUrl
+								},
+								label : editor.lang.common.browseServer
+							},
+							{
+								id : 'type0',
+								label : lang.sourceType,
+								type : 'select',
+								'default' : 'video/mp4',
+								items :
+								[
+									[ 'MP4', 'video/mp4' ],
+									[ 'WebM', 'video/webm' ]
+								],
+								commit : commitSrc,
+								setup : loadSrc
+							}]
+					},
+
+					{
+						type : 'hbox',
+						widths: [ '', '100px', '75px'],
+						children : [
+							{
+								type : 'text',
+								id : 'src1',
+								label : lang.sourceVideo,
+								commit : commitSrc,
+								setup : loadSrc
+							},
+							{
+								type : 'button',
+								id : 'browse',
+								hidden : 'true',
+								style : 'display:inline-block;margin-top:10px;',
+								filebrowser :
+								{
+									action : 'Browse',
+									target: 'info:src1',
+									url: editor.config.filebrowserVideoBrowseUrl || editor.config.filebrowserBrowseUrl
+								},
+								label : editor.lang.common.browseServer
+							},
+							{
+								id : 'type1',
+								label : lang.sourceType,
+								type : 'select',
+								'default':'video/webm',
+								items :
+								[
+									[ 'MP4', 'video/mp4' ],
+									[ 'WebM', 'video/webm' ]
+								],
+								commit : commitSrc,
+								setup : loadSrc
+							}]
+					}
+				]
+			}
+
+		]
+	};
+} );

+ 96 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/docs/.svn/entries

@@ -0,0 +1,96 @@
+10
+
+dir
+3331
+svn://192.168.99.246/java_repos/ewj_market/WebRoot/ckeditor/plugins/video/docs
+svn://192.168.99.246/java_repos
+
+
+
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+f5ac1bad-8383-49da-a5f2-7580d15a88e7
+
+install.html
+file
+
+
+
+
+2014-04-15T02:36:59.843750Z
+eb8b3a0faaca3df8daba088b95ed2ff9
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3029
+
+styles.css
+file
+
+
+
+
+2014-04-15T02:36:59.843750Z
+51e6dc1837397198f165c9e6a6d8e821
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1023
+

+ 79 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/docs/.svn/text-base/install.html.svn-base

@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Video plugin</title>
+<link href="styles.css" rel="stylesheet" type="text/css">
+</head>
+
+<body>
+<h1>Video Plugin for CKEditor</h1>
+
+<h2>Introduction</h2>
+<p>This is a plugin to create HTML5 &lt;video&gt; elements in <a href="http://www.ckeditor.com">CKEditor</a>.</p>
+
+<h3 id="contact">Author:</h3>
+<p><a href="mailto:amla70@gmail.com">Alfonso Mart&iacute;nez de Lizarrondo</a></p>
+<h3>Sponsored by:</h3>
+<p><a href="http://dmlogic.net/">DM logic</a></p>
+<h3>Version history: </h3>
+<ol>
+  <li>1.0: 19-January-2011. First version.</li>
+  <li>1.1: 21-January-2011. Several bug fixes. Detect poster image dimensions. Complete localization.</li>
+  <li>1.2: 24-January-2011. Better dialog layout, specific filebrowserVideoBrowseUrl entry.</li>
+</ol>
+<p>Check for latest version and other <a href="http://alfonsoml.blogspot.com">CKEditor plugins</a></p>
+
+<h2>Installation</h2>
+<h3>1. Copying the files</h3>
+<p>Extract the contents of the zip in you plugins directory, so it ends up like
+    this<br>
+    <!--<img src="installation.png" alt="Screenshot of installation" width="311" height="346" longdesc="#install">-->
+    </p>
+<pre id="--install">
+ckeditor\
+	...
+	images\
+	lang\
+	plugins\
+		...
+		video\
+			plugin.js
+			dialogs\
+				video.js
+			docs\
+				install.html
+			images\
+				icon.png
+				placeholder.png
+		...
+	skins\
+	themes\
+</pre>
+<h3>2. Adding it to CKEditor</h3>
+<p>Now add the plugin in your <em>config.js</em> or custom js configuration
+file:
+<code>config.extraPlugins='video'; </code>
+</p>
+
+<h3>3. Add it to your toolbar</h3>
+<p>In your toolbar configuration, add a new 'Video' item in the place where you want the button to show up.</p>
+
+<h3>4. Configure server browser for video</h3>
+<p>You can use the <code>config.filebrowserVideoBrowseUrl</code> entry to specify a url so the file browser shows just video elements (as long as your configure properly your file browser).</p>
+
+<h3>5. Use it</h3>
+<p>Now empty the cache of your browser and reload the editor, the new button should show up and you can add &lt;video&gt; elements into the content. Here's a <a href="http://www.youtube.com/watch?v=DVKuGO-2-LY">short video of the plugin in action</a>.</p>
+
+<h2>Final notes</h2>
+<p>This plugin has been coded for CKEditor 3.5. It might be possible to backport it for older versions, but I don't think that it's worth the effort as sooner
+or later those installs will (or should) be upgraded to the current version.</p>
+<p>Please, note that only newer browsers support the Video element, in older ones a simple text linking to the source videos is provided, you might want to
+use some javascript or css to customize the final behavior of these elements.</p>
+
+
+<h2>Disclaimers</h2>
+<p>CKEditor is  &copy; CKSource.com</p>
+</body>
+</html>

+ 67 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/docs/.svn/text-base/styles.css.svn-base

@@ -0,0 +1,67 @@
+body {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 90%;
+}
+h1 {
+	text-align:center;
+	font-size:180%;
+}
+h2 {
+	border-bottom:2px solid #CCC;
+	margin:1em 0 0.4em 0;
+}
+h3 {
+	margin-bottom:0.4em;
+}
+p {
+	margin:0 0 1em 1em;
+	text-align:justify;
+}
+ol {
+	margin:0 0 1.2em 1em;
+	padding:0;
+	list-style-type:none;
+}
+ol li {
+	margin:0.2em 0;
+}
+pre {
+	font-size:100%;
+	font-family:"Courier New", Courier, mono;
+	background-color: #CCCCCC;
+	border:1px solid #999;
+	padding:0.2em 1em;
+	margin: 0.4em 0;
+	display:block;
+	white-space: pre;
+	overflow: auto;
+}
+code {
+	font-size:100%;
+	font-family:"Courier New", Courier, mono;
+	background-color: #CCCCCC;
+	border:1px solid #999;
+	padding:0.2em;
+	white-space: pre;
+}
+form {
+	margin:0 0 0 1em;
+}
+span.key {
+	color: #006600;
+}
+#install {
+	display:none
+}
+#languages ul {
+	display:inline;
+	list-style-type:none;
+	margin:0;
+	padding:0;
+}
+#languages li {
+	display:inline;
+	margin:0;
+	padding:0;
+	vertical-align:bottom;
+}

+ 79 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/docs/install.html

@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+	"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Video plugin</title>
+<link href="styles.css" rel="stylesheet" type="text/css">
+</head>
+
+<body>
+<h1>Video Plugin for CKEditor</h1>
+
+<h2>Introduction</h2>
+<p>This is a plugin to create HTML5 &lt;video&gt; elements in <a href="http://www.ckeditor.com">CKEditor</a>.</p>
+
+<h3 id="contact">Author:</h3>
+<p><a href="mailto:amla70@gmail.com">Alfonso Mart&iacute;nez de Lizarrondo</a></p>
+<h3>Sponsored by:</h3>
+<p><a href="http://dmlogic.net/">DM logic</a></p>
+<h3>Version history: </h3>
+<ol>
+  <li>1.0: 19-January-2011. First version.</li>
+  <li>1.1: 21-January-2011. Several bug fixes. Detect poster image dimensions. Complete localization.</li>
+  <li>1.2: 24-January-2011. Better dialog layout, specific filebrowserVideoBrowseUrl entry.</li>
+</ol>
+<p>Check for latest version and other <a href="http://alfonsoml.blogspot.com">CKEditor plugins</a></p>
+
+<h2>Installation</h2>
+<h3>1. Copying the files</h3>
+<p>Extract the contents of the zip in you plugins directory, so it ends up like
+    this<br>
+    <!--<img src="installation.png" alt="Screenshot of installation" width="311" height="346" longdesc="#install">-->
+    </p>
+<pre id="--install">
+ckeditor\
+	...
+	images\
+	lang\
+	plugins\
+		...
+		video\
+			plugin.js
+			dialogs\
+				video.js
+			docs\
+				install.html
+			images\
+				icon.png
+				placeholder.png
+		...
+	skins\
+	themes\
+</pre>
+<h3>2. Adding it to CKEditor</h3>
+<p>Now add the plugin in your <em>config.js</em> or custom js configuration
+file:
+<code>config.extraPlugins='video'; </code>
+</p>
+
+<h3>3. Add it to your toolbar</h3>
+<p>In your toolbar configuration, add a new 'Video' item in the place where you want the button to show up.</p>
+
+<h3>4. Configure server browser for video</h3>
+<p>You can use the <code>config.filebrowserVideoBrowseUrl</code> entry to specify a url so the file browser shows just video elements (as long as your configure properly your file browser).</p>
+
+<h3>5. Use it</h3>
+<p>Now empty the cache of your browser and reload the editor, the new button should show up and you can add &lt;video&gt; elements into the content. Here's a <a href="http://www.youtube.com/watch?v=DVKuGO-2-LY">short video of the plugin in action</a>.</p>
+
+<h2>Final notes</h2>
+<p>This plugin has been coded for CKEditor 3.5. It might be possible to backport it for older versions, but I don't think that it's worth the effort as sooner
+or later those installs will (or should) be upgraded to the current version.</p>
+<p>Please, note that only newer browsers support the Video element, in older ones a simple text linking to the source videos is provided, you might want to
+use some javascript or css to customize the final behavior of these elements.</p>
+
+
+<h2>Disclaimers</h2>
+<p>CKEditor is  &copy; CKSource.com</p>
+</body>
+</html>

+ 67 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/docs/styles.css

@@ -0,0 +1,67 @@
+body {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 90%;
+}
+h1 {
+	text-align:center;
+	font-size:180%;
+}
+h2 {
+	border-bottom:2px solid #CCC;
+	margin:1em 0 0.4em 0;
+}
+h3 {
+	margin-bottom:0.4em;
+}
+p {
+	margin:0 0 1em 1em;
+	text-align:justify;
+}
+ol {
+	margin:0 0 1.2em 1em;
+	padding:0;
+	list-style-type:none;
+}
+ol li {
+	margin:0.2em 0;
+}
+pre {
+	font-size:100%;
+	font-family:"Courier New", Courier, mono;
+	background-color: #CCCCCC;
+	border:1px solid #999;
+	padding:0.2em 1em;
+	margin: 0.4em 0;
+	display:block;
+	white-space: pre;
+	overflow: auto;
+}
+code {
+	font-size:100%;
+	font-family:"Courier New", Courier, mono;
+	background-color: #CCCCCC;
+	border:1px solid #999;
+	padding:0.2em;
+	white-space: pre;
+}
+form {
+	margin:0 0 0 1em;
+}
+span.key {
+	color: #006600;
+}
+#install {
+	display:none
+}
+#languages ul {
+	display:inline;
+	list-style-type:none;
+	margin:0;
+	padding:0;
+}
+#languages li {
+	display:inline;
+	margin:0;
+	padding:0;
+	vertical-align:bottom;
+}

+ 96 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/entries

@@ -0,0 +1,96 @@
+10
+
+dir
+3331
+svn://192.168.99.246/java_repos/ewj_market/WebRoot/ckeditor/plugins/video/images
+svn://192.168.99.246/java_repos
+
+
+
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+f5ac1bad-8383-49da-a5f2-7580d15a88e7
+
+placeholder.png
+file
+
+
+
+
+2014-04-15T02:36:59.843750Z
+c60fd55e63bc960b374f0fdfb6a03156
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+986
+
+icon.png
+file
+
+
+
+
+2014-04-15T02:36:59.843750Z
+119975ad79aa734b6c0b21cade11b514
+2014-04-15T06:48:03.820786Z
+3331
+chenlieli
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1272
+

+ 5 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/prop-base/icon.png.svn-base

@@ -0,0 +1,5 @@
+K 13
+svn:mime-type
+V 24
+application/octet-stream
+END

+ 5 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/prop-base/placeholder.png.svn-base

@@ -0,0 +1,5 @@
+K 13
+svn:mime-type
+V 24
+application/octet-stream
+END

BIN
src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/text-base/icon.png.svn-base


BIN
src/main/webapp/assets/admin/ckeditor/plugins/video/images/.svn/text-base/placeholder.png.svn-base


BIN
src/main/webapp/assets/admin/ckeditor/plugins/video/images/icon.png


BIN
src/main/webapp/assets/admin/ckeditor/plugins/video/images/placeholder.png


+ 231 - 0
src/main/webapp/assets/admin/ckeditor/plugins/video/plugin.js

@@ -0,0 +1,231 @@
+/*
+ * @file Video plugin for CKEditor
+ * Copyright (C) 2011 Alfonso Martínez de Lizarrondo
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ */
+
+( function() {
+
+CKEDITOR.plugins.add( 'video',
+{
+	// Translations, available at the end of this file, without extra requests
+	lang : [ 'en', 'es' ],
+
+	getPlaceholderCss : function()
+	{
+		return 'img.cke_video' +
+				'{' +
+					'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
+					'background-position: center center;' +
+					'background-repeat: no-repeat;' +
+					'background-color:gray;'+
+					'border: 1px solid #a9a9a9;' +
+					'width: 80px;' +
+					'height: 80px;' +
+				'}';
+	},
+
+	onLoad : function()
+	{
+		// v4
+		if (CKEDITOR.addCss)
+			CKEDITOR.addCss( this.getPlaceholderCss() );
+
+	},
+
+	init : function( editor )
+	{
+	
+		 var b = "video[controls,id,height,poster,width];source[src,type]";
+		var lang = editor.lang.video;
+
+		// Check for CKEditor 3.5
+		if (typeof editor.element.data == 'undefined')
+		{
+			alert('The "video" plugin requires CKEditor 3.5 or newer');
+			return;
+		}
+
+		CKEDITOR.dialog.add( 'video', this.path + 'dialogs/video.js' );
+
+		editor.addCommand( 'Video', new CKEDITOR.dialogCommand( 'video', {
+            allowedContent: b,
+            requiredContent: "video"
+        } ) );
+		editor.ui.addButton( 'Video',
+			{
+				label : lang.toolbar,
+				command : 'Video',
+				icon : this.path + 'images/icon.png'
+			} );
+
+		// v3
+		if (editor.addCss)
+			editor.addCss( this.getPlaceholderCss() );
+
+
+		// If the "menu" plugin is loaded, register the menu items.
+		if ( editor.addMenuItems )
+		{
+			editor.addMenuItems(
+				{
+					video :
+					{
+						label : lang.properties,
+						command : 'Video',
+						group : 'flash'
+					}
+				});
+		}
+
+		editor.on( 'doubleclick', function( evt )
+			{
+				var element = evt.data.element;
+
+				if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'video' )
+					evt.data.dialog = 'video';
+			});
+
+		// If the "contextmenu" plugin is loaded, register the listeners.
+		if ( editor.contextMenu )
+		{
+			editor.contextMenu.addListener( function( element, selection )
+				{
+					if ( element && element.is( 'img' ) && !element.isReadOnly()
+							&& element.data( 'cke-real-element-type' ) == 'video' )
+						return { video : CKEDITOR.TRISTATE_OFF };
+				});
+		}
+
+		// Add special handling for these items
+		CKEDITOR.dtd.$empty['cke:source']=1;
+		CKEDITOR.dtd.$empty['source']=1;
+
+		editor.lang.fakeobjects.video = lang.fakeObject;
+
+
+	}, //Init
+
+	afterInit: function( editor )
+	{
+		var dataProcessor = editor.dataProcessor,
+			htmlFilter = dataProcessor && dataProcessor.htmlFilter,
+			dataFilter = dataProcessor && dataProcessor.dataFilter;
+
+		// dataFilter : conversion from html input to internal data
+		dataFilter.addRules(
+			{
+
+			elements : {
+				$ : function( realElement )
+				{
+						if ( realElement.name == 'video' )
+						{
+							realElement.name = 'cke:video';
+							for( var i=0; i < realElement.children.length; i++)
+							{
+								if ( realElement.children[ i ].name == 'source' )
+									realElement.children[ i ].name = 'cke:source'
+							}
+
+							var fakeElement = editor.createFakeParserElement( realElement, 'cke_video', 'video', false ),
+								fakeStyle = fakeElement.attributes.style || '';
+
+							var width = realElement.attributes.width,
+								height = realElement.attributes.height,
+								poster = realElement.attributes.poster;
+
+							if ( typeof width != 'undefined' )
+								fakeStyle = fakeElement.attributes.style = fakeStyle + 'width:' + CKEDITOR.tools.cssLength( width ) + ';';
+
+							if ( typeof height != 'undefined' )
+								fakeStyle = fakeElement.attributes.style = fakeStyle + 'height:' + CKEDITOR.tools.cssLength( height ) + ';';
+
+							if ( poster )
+								fakeStyle = fakeElement.attributes.style = fakeStyle + 'background-image:url(' + poster + ');';
+
+							return fakeElement;
+						}
+				}
+			}
+
+			}
+		);
+
+	} // afterInit
+
+} ); // plugins.add
+
+
+var en = {
+		toolbar	: 'Video',
+		dialogTitle : 'Video properties',
+		fakeObject : 'Video',
+		properties : 'Edit video',
+		widthRequired : 'Width field cannot be empty',
+		heightRequired : 'Height field cannot be empty',
+		poster: 'Poster image',
+		sourceVideo: 'Source video',
+		sourceType : 'Video type',
+		linkTemplate :  '<a href="%src%">%type%</a> ',
+		fallbackTemplate : 'Your browser doesn\'t support video.<br>Please download the file: %links%'
+	};
+var cn = {
+		toolbar	: '视频',
+		dialogTitle : '视频属性',
+		fakeObject : '视频',
+		properties : '编辑视频',
+		widthRequired : '宽度不能为空',
+		heightRequired : '高度不能为空',
+		poster: '海报图像',
+		sourceVideo: '视频地址',
+		sourceType : '视频类型',
+		linkTemplate :  '<a href="%src%">%type%</a> ',
+		fallbackTemplate : '你的浏览器不支持此播放器.<br>请直接下载文件: %links%'
+};
+
+var es = {
+		toolbar	: 'Video',
+		dialogTitle : 'Propiedades de video',
+		fakeObject : 'Video',
+		properties : 'Editar el video',
+		widthRequired : 'La anchura no se puede dejar en blanco',
+		heightRequired : 'La altura no se puede dejar en blanco',
+		poster: 'Imagen de presentación',
+		sourceVideo: 'Archivo de video',
+		sourceType : 'Tipo',
+		linkTemplate :  '<a href="%src%">%type%</a> ',
+		fallbackTemplate : 'Su navegador no soporta VIDEO.<br>Por favor, descargue el fichero: %links%'
+	};
+
+	// v3
+	if (CKEDITOR.skins)
+	{
+		en = { video : en} ;
+		es = { video : es} ;
+		cn = { video : cn} ;
+	}
+
+// Translations
+CKEDITOR.plugins.setLang( 'video', 'en', en );
+
+CKEDITOR.plugins.setLang( 'video', 'es', es );
+CKEDITOR.plugins.setLang( 'video', 'zh-cn', cn );
+
+})();