diff --git a/app/assets/javascripts/basic.js b/app/assets/javascripts/basic.js index 7f975c67..3aa1a516 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 064f9154..9f51e607 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 ede0441b..9a2803e2 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 811ed303..61728dc5 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 bc586229..21bdbfda 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 c9274aab..00000000 --- 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 b892d754..00000000 --- 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 2086da51..165aeb72 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 5d42da5c..4e66fe1a 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? %>
<% else %> -
+
<% if form_file.file.blank? %> <%= t(:no_file) %> <% else %> - <%= link_to form_file.file_identifier, form_file.file.url, {:class => 'file-link for_preview', :target => '_blank', :title => t(:view), "data-trigger" => :hover}.merge(file_picture_preview_setting(form_file.file.url)) %> + <%= link_to content_tag(:i) + form_file.file_identifier, form_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_file.file_identifier} %> <% end %> <% end %>
- <% if form_file.new_record? %> - - <% end %> + <% @site_valid_locales.each_with_index do |locale, i| %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb index 69dad760..7ce3574f 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb @@ -2,9 +2,11 @@ <% 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/file-type" %> <% end %> <%= f.error_messages %> @@ -179,9 +181,8 @@ $(this).parent('.add-btn').prev('.add-target').children('.start-line').eq(le).children('.input-append').find('.tab-content').each(function() { $(this).children('.tab-pane').eq(on).addClass('in active').siblings().removeClass('in active'); }); - $('.main-forms .add-on').tooltip(); + formTip(); }); - $('.for_preview').popover({ html : true }); $(document).on('click', '.delete_file', function(){ $(this).parents('.input-prepend').remove(); }); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb index e876d343..baa91244 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb @@ -1,5 +1,13 @@ -
- <%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn', :target => '_blank', :title => t(:view)} ) : '' %> +<% if form_file.new_record? %> +
+<% else %> +
+ <% if form_file.file.blank? %> + <%= t(:no_file) %> + <% else %> + <%= link_to content_tag(:i) + form_file.file_identifier, form_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_file.file_identifier} %> + <% end %> +<% end %>
- + <% @site_valid_locales.each_with_index do |locale, i| %> <%= locale %>"> <%= f.fields_for :file_title_translations do |f| %> - <%= f.text_field locale, :class => "input-medium", placeholder: 'File Name', :value => (form_file.file_title_translations[locale] rescue nil) %> + <%= f.text_field locale, :class => "input-medium", placeholder: t('file.name'), :value => (form_file.file_title_translations[locale] rescue nil) %> <% end %> <% end %> @@ -24,11 +32,11 @@ - <%= f.text_field :sort_number , :class => "input-mini"%> + <%= f.text_field :sort_number , :class => "input-mini" %> - <%= t('archive.show_lang') %> +