<% tag_name ||= ""%>
- <%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag,:select_tag_name => tag_name,:container_type=>container_type} %>
+ <%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag,:select_tag_name => tag_name} %>
<%= render :partial => "courses/course_resources_html", :locals => {:obj => obj ,:object_flag => object_flag } %>
diff --git a/lib/rails_kindeditor/app/controllers/kindeditor/assets_controller.rb b/lib/rails_kindeditor/app/controllers/kindeditor/assets_controller.rb
index 0e1177563..d7d5948d4 100644
--- a/lib/rails_kindeditor/app/controllers/kindeditor/assets_controller.rb
+++ b/lib/rails_kindeditor/app/controllers/kindeditor/assets_controller.rb
@@ -13,7 +13,7 @@ class Kindeditor::AssetsController < ApplicationController
logger.warn '========= Warning: the owner_id is 0, "delete uploaded files automatically" will not work. =========' if defined?(logger) && @asset.owner_id == 0
@asset.asset_type = @dir
if @asset.save
- render :text => ({:error => 0, :url => @asset.asset.url,:asset_id => @asset.id}.to_json)
+ render :text => ({:error => 0, :url => "http://"+Setting.host_name + "/" + @asset.asset.url,:asset_id => @asset.id}.to_json)
else
show_error(@asset.errors.full_messages)
end
diff --git a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
index f30ee2236..eef2eb576 100644
--- a/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
+++ b/lib/rails_kindeditor/lib/rails_kindeditor/helper.rb
@@ -9,7 +9,8 @@ module RailsKindeditor
output << text_area_tag(name, content, input_html)
output << javascript_tag(js_replace(id, options.merge(window_onload: 'true',
:autoHeightMode=>true,
- afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
+ afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})',
+ emotionsBasePath: 'http://' + Setting.host_name
)))
end
@@ -21,7 +22,8 @@ module RailsKindeditor
output_buffer << build_text_area_tag(name, method, self, options, input_html)
output_buffer << javascript_tag(js_replace(input_html['id'],options.merge(window_onload: 'true',
:autoHeightMode=>true,
- afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})'
+ afterCreate: 'eval(function(){enablePasteImg(self);this.loadPlugin("autoheight")})',
+ emotionsBasePath: 'http://' + Setting.host_name
)))
end
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 448585376..da7434d9b 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -243,6 +243,7 @@ K.options = {
shadowMode : true,
loadStyleMode : true,
basePath : K.basePath,
+ emotionsBasePath: 'http://forge.trustie.net', //TODO
themesPath : K.basePath + 'themes/',
langPath : K.basePath + 'lang/',
pluginsPath : K.basePath + 'plugins/',
@@ -5459,6 +5460,7 @@ function _editor(options) {
_instances = [];
function _create(expr, options) {
options = options || {};
+ options.emotionsBasePath = _undef(options.emotionsBasePath,'http://forge.trustie.net') // TODO
options.basePath = _undef(options.basePath, K.basePath);
options.themesPath = _undef(options.themesPath, options.basePath + 'themes/');
options.langPath = _undef(options.langPath, options.basePath + 'lang/');
@@ -5623,7 +5625,9 @@ _plugin('core', function(K) {
url:K.addParam('/kindeditor/upload', 'dir=image'),
afterUpload : function(data) {
if (data.error === 0) {
- var url = K.formatUrl(data.url, 'absolute');
+
+ var url = data.url//K.formatUrl(data.url, 'absolute');
+ // console.log(url)
self.exec('insertimage', url, 'image','','','1','');
//self.exec('insertimage', url, 'image','','','1','left');
//self.insertHtml('

');
diff --git a/public/assets/kindeditor/plugins/emoticons/emoticons.js b/public/assets/kindeditor/plugins/emoticons/emoticons.js
index b9dfec431..7884f53fb 100644
--- a/public/assets/kindeditor/plugins/emoticons/emoticons.js
+++ b/public/assets/kindeditor/plugins/emoticons/emoticons.js
@@ -9,7 +9,8 @@
KindEditor.plugin('emoticons', function(K) {
var self = this, name = 'emoticons',
- path = (self.emoticonsPath || self.pluginsPath + 'emoticons/images/'),
+
+ path = self.emotionsBasePath + (self.emoticonsPath || self.pluginsPath + 'emoticons/images/'),
allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons,
currentPageNum = 1;
self.clickToolbar(name, function() {
diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css
index b6566d628..096dd7e57 100644
--- a/public/stylesheets/header.css
+++ b/public/stylesheets/header.css
@@ -4,7 +4,7 @@
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
-.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;}
+.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;}
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
@@ -43,9 +43,9 @@ a.homepageImageNumber:hover {color:#15bccf;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
-.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
+.homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
-a.coursesLineGrey {color:#808080; display:block;}
+a.coursesLineGrey {padding-left:25px; color:#808080; display:block;}
a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#b3e0ee;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 180e8b6ca..5b187fa2d 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -518,7 +518,7 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
-.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle; padding:0px 10px;}
+.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;}
/*.navHomepageMenu:hover {background-color:#0ea6b7;}*/
.navHomepageSearchBoxcontainer {margin-top:11px; }
@@ -549,7 +549,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
-a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;}
+a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon2.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
@@ -564,9 +564,9 @@ a.homepageImageNumber:hover {color:#269ac9;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:13px; border-bottom:1px solid #dddddd;}
-.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
+.homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#269ac9;}
-a.coursesLineGrey {color:#808080; display:block;}
+a.coursesLineGrey {padding-left:25px; color:#808080; display:block;}
a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#269ac9;}
@@ -1066,7 +1066,7 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
-a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;}
+a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon2.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 90651f362..89073a8f8 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -479,9 +479,9 @@ a.homepageImageNumber:hover {color:#15bccf;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
-.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
+.homepageLeftMenuCoursesLine {height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
-a.coursesLineGrey {color:#15bccf; display:block;}
+a.coursesLineGrey {padding-left:25px; color:#15bccf; display:block;}
a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#b3e0ee;}