Changeset 1772
- Timestamp:
- 04/04/08 20:05:22 (23 months ago)
- Location:
- branches/release-33
- Files:
-
- 2 modified
-
lib/MT/Template/ContextHandlers.pm (modified) (7 diffs)
-
tmpl/cms/include/itemset_action_widget.tmpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-33/lib/MT/Template/ContextHandlers.pm
r1765 r1772 931 931 my $actions_top = ""; 932 932 my $actions_bottom = ""; 933 my $form_id = "$id-form"; 933 934 if ($show_actions) { 934 $actions_top = qq{<\$MTApp:ActionBar bar_position="top" hide_pager="$hide_pager" \$>};935 $actions_bottom = qq{<\$MTApp:ActionBar bar_position="bottom" hide_pager="$hide_pager" \$>};935 $actions_top = qq{<\$MTApp:ActionBar bar_position="top" hide_pager="$hide_pager" form_id="$form_id"\$>}; 936 $actions_bottom = qq{<\$MTApp:ActionBar bar_position="bottom" hide_pager="$hide_pager" form_id="$form_id"\$>}; 936 937 } else { 937 938 $listing_class .= " hide_actions"; … … 959 960 $listing_header 960 961 </div> 961 <form id="$ id-form" class="listing-form"962 <form id="$form_id" class="listing-form" 962 963 action="$action" method="post" 963 964 onsubmit="return this['__mode'] ? true : false"> … … 1006 1007 my ($ctx, $args, $cond) = @_; 1007 1008 my $pos = $args->{bar_position} || 'top'; 1009 my $form_id = $args->{form_id} ? qq{ form_id="$args->{form_id}"} : ""; 1008 1010 my $pager = $args->{hide_pager} ? '' 1009 1011 : qq{\n <mt:include name="include/pagination.tmpl" bar_position="$pos">}; … … 1014 1016 <span class="button-actions actions">$buttons</span> 1015 1017 <span class="plugin-actions actions"> 1016 <mt:include name="include/itemset_action_widget.tmpl" >1018 <mt:include name="include/itemset_action_widget.tmpl"$form_id> 1017 1019 </span> 1018 1020 </div> … … 1329 1331 my $res = $builder->build($ctx, $tokens, $cond); 1330 1332 return $ctx->error($builder->errstr) unless defined $res; 1331 $out .= $glue if $cnt > 1; 1332 $out .= $res; 1333 $cnt++; 1333 if ($res ne '') { 1334 $out .= $glue if $cnt > 1; 1335 $out .= $res; 1336 $cnt++; 1337 } 1334 1338 } 1335 1339 return $out; … … 1603 1607 my $res = $builder->build($ctx, $tokens, $cond); 1604 1608 return $ctx->error($builder->errstr) unless defined $res; 1605 $out .= $glue if $i > 1; 1606 $out .= $res; 1607 $i++; 1609 if ($res ne '') { 1610 $out .= $glue if $i > 1; 1611 $out .= $res; 1612 $i++; 1613 } 1608 1614 } 1609 1615 return $out; … … 4706 4712 defined(my $out = $builder->build($ctx, $tokens, $cond)) 4707 4713 or return $ctx->error( $builder->errstr ); 4708 push @res, $out ;4714 push @res, $out if $out ne ''; 4709 4715 } 4710 4716 my $sep = $args->{glue} || ''; -
branches/release-33/tmpl/cms/include/itemset_action_widget.tmpl
r1309 r1772 25 25 </select> 26 26 </div> 27 <a href="javascript:void(0)" class="small-button" onclick="doPluginAction(getByID('< $mt:var name="object_type"$>-listing-form'), '<mt:if name="object_label_plural"><mt:var name="object_label_plural" escape="js"></mt:if>', '<__trans phrase="to act upon" escape="js">'); return false;"><__trans phrase="Go"></a>27 <a href="javascript:void(0)" class="small-button" onclick="doPluginAction(getByID('<mt:if name="form_id"><mt:var name="form_id"><mt:else><$mt:var name="object_type"$>-listing-form</mt:if>'), '<mt:if name="object_label_plural"><mt:var name="object_label_plural" escape="js"></mt:if>', '<__trans phrase="to act upon" escape="js">'); return false;"><__trans phrase="Go"></a> 28 28 </mt:if>
