Replace with-tip with ofn-with-tip: misc

This commit is contained in:
Rohan Mitchell
2016-02-12 08:33:37 +11:00
parent 17cda86dfa
commit 258e84fc0a
9 changed files with 15 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ angular.module('enterprise_fees', [])
return function(scope, element, attrs) {
if(scope.enterprise_fee.id) {
var url = "/admin/enterprise_fees/" + scope.enterprise_fee.id
var html = '<a href="'+url+'" class="delete-resource icon_link with-tip icon-trash no-text" data-action="remove" data-confirm="Are you sure?" url="'+url+'"></a>';
var html = '<a href="'+url+'" class="delete-resource icon_link icon-trash no-text" data-action="remove" data-confirm="Are you sure?" url="'+url+'"></a>';
//var html = '<a href="'+url+'" class="delete-resource" data-confirm="Are you sure?"><img alt="Delete" src="/assets/admin/icons/delete.png" /> Delete</a>';
element.append(html);
}

View File

@@ -5,7 +5,7 @@ module Spree
def link_to_remove_fields(name, f, options = {})
name = '' if options[:no_text]
options[:class] = '' unless options[:class]
options[:class] += 'no-text with-tip' if options[:no_text]
options[:class] += 'no-text' if options[:no_text]
url = if f.object.persisted?
options[:url] || [:admin, f.object]

View File

@@ -3,7 +3,7 @@
- @styles.each_with_index do |(style_name, style_value), index|
.field.three.columns
= label_tag "attachment_styles[#{style_name}]", style_name
%a.destroy_style.with-tip{:alt => t(:destroy), :href => "#", :title => t(:destroy)}
%a.destroy_style{:alt => t(:destroy), :href => "#", :title => t(:destroy)}
%i.icon-trash
= text_field_tag "attachment_styles[#{style_name}][]", admin_image_settings_geometry_from_style(style_value), :class => 'fullwidth'
%br/

View File

@@ -2,5 +2,5 @@
- if order.special_instructions.present?
%br
%span{class: "icon-warning-sign with-tip", title: order.special_instructions}
%span{class: "icon-warning-sign", "ofn-with-tip" => order.special_instructions}
notes

View File

@@ -0,0 +1,2 @@
add_to_attributes "table#listing_orders"
attributes "ng-app" => "ofn.admin"

View File

@@ -11,7 +11,7 @@
- suppliers = order_cycle.suppliers.merge(OpenFoodNetwork::OrderCyclePermissions.new(spree_current_user, order_cycle).visible_enterprises)
- supplier_list = suppliers.map(&:name).sort.join ', '
- if suppliers.count > 3
%span.with-tip{'data-powertip' => supplier_list}
%span{'ofn-with-tip' => supplier_list}
= suppliers.count
suppliers
- else
@@ -21,7 +21,7 @@
- distributors = order_cycle.distributors.merge(OpenFoodNetwork::OrderCyclePermissions.new(spree_current_user, order_cycle).visible_enterprises)
- distributor_list = distributors.map(&:name).sort.join ', '
- if distributors.count > 3
%span.with-tip{'data-powertip' => distributor_list}
%span{'ofn-with-tip' => distributor_list}
= distributors.count
distributors
- else

View File

@@ -11,7 +11,7 @@
%li
= button_link_to "Show more", main_app.admin_order_cycles_path(params: { show_more: true })
= form_for @order_cycle_set, :url => main_app.bulk_update_admin_order_cycles_path do |f|
= form_for @order_cycle_set, url: main_app.bulk_update_admin_order_cycles_path, html: {"ng-app" => "admin.orderCycles"} do |f|
%table.index#listing_order_cycles
%colgroup
%col

View File

@@ -1,10 +1,13 @@
- content_for :app_wrapper_attrs do
= "ng-app='admin.lineItems'"
- content_for :page_title do
%h1.page-title Bulk Order Management
%a.with-tip{ 'data-powertip' => "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required." } What's this?
%a{ 'ofn-with-tip' => "Use this page to alter product quantities across multiple orders. Products may also be removed from orders entirely, if required." } What's this?
= render :partial => 'spree/admin/shared/order_sub_menu'
%div{ ng: { app: 'admin.lineItems', controller: 'LineItemsCtrl' } }
%div{ ng: { controller: 'LineItemsCtrl' } }
%save-bar{ save: "submit()", form: "bulk_order_form" }
.filters{ :class => "sixteen columns alpha" }
.date_filter{ :class => "two columns alpha" }

View File

@@ -25,6 +25,6 @@
%td.actions
%a{ 'ng-click' => 'editWarn(product,variant)', :class => "edit-variant icon-edit no-text", 'ng-show' => "variantSaved(variant)" }
%td.actions
%span.icon-warning-sign.with-tip{ 'ng-if' => 'variant.variant_overrides', title: "This variant has {{variant.variant_overrides.length}} override(s)" }
%span.icon-warning-sign{ 'ng-if' => 'variant.variant_overrides', 'ofn-with-tip' => "This variant has {{variant.variant_overrides.length}} override(s)" }
%td.actions
%a{ 'ng-click' => 'deleteVariant(product,variant)', "ng-class" => '{disabled: product.variants.length < 2}', :class => "delete-variant icon-trash no-text" }