diff --git a/app/assets/javascripts/basic.js b/app/assets/javascripts/basic.js index 7f975c67a..3aa1a5169 100644 --- a/app/assets/javascripts/basic.js +++ b/app/assets/javascripts/basic.js @@ -1,8 +1,8 @@ //= require jquery //= require jquery_ujs -//= require jquery.ui.tooltip //= require basic/bootstrap +//= require jquery.ui.tooltip //= require basic/iscroll //= require basic/orbit_js_1.0.1.js //= require basic/jquery.nanoscroller.js diff --git a/app/assets/javascripts/ckeditor/config.js.erb b/app/assets/javascripts/ckeditor/config.js.erb index 064f91545..9f51e6070 100644 --- a/app/assets/javascripts/ckeditor/config.js.erb +++ b/app/assets/javascripts/ckeditor/config.js.erb @@ -121,3 +121,12 @@ CKEDITOR.editorConfig = function( config ) { // Make dialogs simpler. config.removeDialogTabs = 'image:advanced;link:advanced'; }; + +CKEDITOR.on('instanceReady',function(){ + $('.cke_button').tooltip({ + position: { + my: "center bottom-4", + at: "center top" + } + }); +}); diff --git a/app/assets/javascripts/lib/archive/file-type.js b/app/assets/javascripts/lib/file-type.js similarity index 81% rename from app/assets/javascripts/lib/archive/file-type.js rename to app/assets/javascripts/lib/file-type.js index ede0441ba..9a2803e2a 100644 --- a/app/assets/javascripts/lib/archive/file-type.js +++ b/app/assets/javascripts/lib/file-type.js @@ -4,7 +4,12 @@ $(function () { $type = ['pdf', 'psd', 'ai', 'fla', 'swf', 'in', 'acc', 'do', 'xl', 'pp', 'zip', 'rar', '7z', 'txt', 'jp', 'gif', 'png', 'mp3', 'wav']; $fileType.each(function (i) { - var $fileTypeHref = $(this).children('a').attr('href'); + var $fileTypeHref = null; + if($(this).children('a').length) { + $fileTypeHref = $(this).children('a').attr('href'); + } else { + $fileTypeHref = $(this).attr('href'); + }; $fileTypeHref = $fileTypeHref.split("/"); $fileTypeHref = $fileTypeHref[$fileTypeHref.length-1]; @@ -21,8 +26,8 @@ $(function () { $fileType.eq(i).addClass('type-audio'); } else { $fileType.eq(i).addClass('type-'+type); - } - } - }) + }; + }; + }); }); }); \ No newline at end of file diff --git a/app/assets/stylesheets/basic/global.css b/app/assets/stylesheets/basic/global.css index 811ed303d..61728dc52 100644 --- a/app/assets/stylesheets/basic/global.css +++ b/app/assets/stylesheets/basic/global.css @@ -520,9 +520,10 @@ legend { padding: 0px 5px; position: absolute; z-index: 9999; - max-width: 300px; + max-width: 500px; border-radius: 3px; background-color: #0088CC; + white-space: nowrap; } #sideset .ui-tooltip.sidebar-tooltip:after { display: none; @@ -532,9 +533,10 @@ legend { padding: 0px 5px; position: absolute; z-index: 9999; - max-width: 300px; + max-width: 500px; border-radius: 3px; background-color: #000000; + white-space: nowrap; } .ui-tooltip:after { content: ''; diff --git a/config/locales/new_ui.en.yml b/config/locales/new_ui.en.yml index bc586229b..21bdbfda2 100644 --- a/config/locales/new_ui.en.yml +++ b/config/locales/new_ui.en.yml @@ -6,6 +6,7 @@ en: alternative: Alternative approval_setting: Approval Setting change: Change + change_file: Change file create: error: category: Error when creating category @@ -40,6 +41,7 @@ en: select_all: Select all select_file: Select file select_image: Select image + sort_number: Sort number tag: add: Add tag delete: Delete tags diff --git a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletin_categorys_helper.rb b/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletin_categorys_helper.rb deleted file mode 100644 index c9274aab5..000000000 --- a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletin_categorys_helper.rb +++ /dev/null @@ -1,16 +0,0 @@ -module Panel::Announcement::BackEnd::BulletinCategorysHelper -include ActionView::Helpers::UrlHelper - - - def show_anc_cate_permission_link(category) - type = 'submit' - oa = category.get_object_auth_by_title(type) - if oa.nil? - category.object_auths.new(title: type ).save - oa = category.get_object_auth_by_title(type) - end -# link_to t(:category_auth), edit_admin_object_auth_path(oa) - link_to t(:category_auth),admin_object_auth_ob_auth_path(oa) - end - -end \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb b/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb deleted file mode 100644 index b892d7549..000000000 --- a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Panel::Announcement::BackEnd::BulletinsHelper - - def file_picture_preview_setting(file_path) - ext = File.extname(file_path)[1..-1].downcase - unless file_path.nil? - case ext - when "jpg","jpeg","png","gif" - {"data-content" => "#{image_tag file_path}" } - when "pdf", "zip", "rar" - {"data-content" => "#{image_tag("http://#{request.host_with_port}/assets/ft-icons/#{ext}/#{ext}-64_32.png")}"} - when "doc", "docx" - {"data-content" => "#{image_tag("http://#{request.host_with_port}/assets/ft-icons/docx_mac/docx_mac-64_32.png")}"} - when "xls", "xlsx" - {"data-content" => "#{image_tag("http://#{request.host_with_port}/assets/ft-icons/xlsx_mac/xlsx_mac-64_32.png")}"} - when "ppt", "pptx" - {"data-content" => "#{image_tag("http://#{request.host_with_port}/assets/ft-icons/pptx_mac/pptx_mac-64_32.png")}"} - else - {"data-content" => t("sys.not_previewable") } - end - end - end -end diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 2086da51a..165aeb726 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -1,14 +1,14 @@ <% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> + <%= stylesheet_link_tag "lib/main-list" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/bootstrap-datetimepicker" %> - <%#= javascript_include_tag "lib/datetimepicker/date.time.picker.js" %> <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> - <%#= javascript_include_tag "lib/ckeditor/ckeditor.js" %> <%= javascript_include_tag "lib/modal-preview" %> + <%= javascript_include_tag "lib/file-type" %> <% end %> <%= f.error_messages %> @@ -295,7 +295,6 @@ }); formTip(); }); - $('.for_preview').popover({ html : true }); $(document).on('click', '.delete_link', function(){ $(this).parents('.input-prepend').remove(); }); diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_file.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_file.html.erb index 5d42da5ce..4e66fe1a9 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_file.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form_file.html.erb @@ -1,26 +1,24 @@ <% if form_file.new_record? %>