Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision cfe73453

Von Kivitendo Admin vor mehr als 8 Jahren hinzugefügt

  • ID cfe734535df3c33fe2179b5c58e10e706029e15f
  • Vorgänger 80c4366a
  • Nachfolger 1fc583c0

ShopPart - editing and adding in jquery ui dialog

from shop tab in part tab.

Unterschiede anzeigen:

bin/mozilla/ic.pl
1641 1641
    if (scalar @{ $form->{CUSTOM_VARIABLES} });
1642 1642

  
1643 1643
  my $active_shops = SL::DB::Manager::Shop->get_all(query => [ obsolete => 0 ], sort_by => 'sortkey');
1644
  $form->{ACTIVE_SHOPS} = $active_shops;
1645
  foreach my $shop ( @$active_shops ) {
1646
    my ($shop_part) =  $part->find_shop_parts( { shop_id => $shop->id } );
1647
    push( @{ $form->{SHOP_PARTS} }, $shop_part );
1648
  };
1644
  $form->{SHOP_PARTS} = SL::DB::Manager::ShopPart->get_all( query => [ part_id => $part->id , 'shop.obsolete' => 0 ], with_objects => ['shop'] );
1645

  
1646
  # $form->{ACTIVE_SHOPS} = $active_shops;
1647
  # foreach my $shop ( @$active_shops ) {
1648
  #   my ($shop_part) =  $part->find_shop_parts( { shop_id => $shop->id } );
1649
  #   push( @{ $form->{SHOP_PARTS} }, $shop_part );
1650
  # };
1651
  my @used_shop_ids = map { $_->shop->id } @{ $form->{SHOP_PARTS} };
1652
  $form->{SHOPS_NOT_ASSIGNED} = SL::DB::Manager::Shop->get_all( query => [ obsolete => 0, '!id' => \@used_shop_ids ], sort_by => 'sortkey' );
1649 1653

  
1650
  $::request->layout->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery kivi.PriceRule);
1654
  $::request->layout->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery kivi.PriceRule kivi.shop_part);
1651 1655
  $::request->layout->add_javascripts_inline("\$(function(){kivi.PriceRule.load_price_rules_for_part(@{[ $::form->{id} * 1 ]})});") if $::form->{id};
1652 1656
  $form->header;
1653 1657
  #print $form->parse_html_template('ic/form_header', { ALL_PRICE_FACTORS => $form->{ALL_PRICE_FACTORS},

Auch abrufbar als: Unified diff