Subversion Repositories SmartDukaan

Rev

Rev 6788 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6788 Rev 12523
Line 34... Line 34...
34
    private static ItemActionsUiBinder uiBinder = GWT.create(ItemActionsUiBinder.class);
34
    private static ItemActionsUiBinder uiBinder = GWT.create(ItemActionsUiBinder.class);
35
    private final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
35
    private final CatalogServiceAsync catalogService = GWT.create(CatalogService.class);
36
    
36
    
37
    private ItemDetails itemDetails;
37
    private ItemDetails itemDetails;
38
    
38
    
39
    @UiField Button addItem, updateItem, pushItemToProd, phaseoutItem, activateItem, markAliveItem, pauseItem;
39
    @UiField Button addItem, updateItem, pushItemToProd, phaseoutItem, activateItem, markAliveItem, pauseItem, partiallyActive;
40
    @UiField Button markRisky, unmarkRisky;
40
    @UiField Button markRisky, unmarkRisky;
41
    @UiField Button generateMasterSheet;
41
    @UiField Button generateMasterSheet;
42
    
42
    
43
    public ItemActions(){
43
    public ItemActions(){
44
        initWidget(uiBinder.createAndBindUi(this));
44
        initWidget(uiBinder.createAndBindUi(this));
Line 49... Line 49...
49
    @UiHandler("updateItem")
49
    @UiHandler("updateItem")
50
    void updateItem(ClickEvent event) {
50
    void updateItem(ClickEvent event) {
51
        itemDetails.updateItem();
51
        itemDetails.updateItem();
52
    }
52
    }
53
    
53
    
-
 
54
 
-
 
55
    @UiHandler("partiallyActive")
-
 
56
    void partiallyActive(ClickEvent event) {
-
 
57
        if(itemDetails.getItem() == null) {
-
 
58
            Window.alert("Please select an item to update");
-
 
59
            return;
-
 
60
        }
-
 
61
        if(itemDetails.getItem().getItemStatusValue().equals(8) || itemDetails.getItem().getItemStatusValue().equals(4)) {
-
 
62
	        new PartiallyActiveDialog(itemDetails.getItem());
-
 
63
        } else {
-
 
64
    		Window.alert("Could not be marked Partially Active");
-
 
65
    	}
-
 
66
    }
-
 
67
    
54
    /**
68
    /**
55
     * creates a new form to fill up item details and displays the form.
69
     * creates a new form to fill up item details and displays the form.
56
     * @param event
70
     * @param event
57
     */
71
     */
58
    @UiHandler("addItem")
72
    @UiHandler("addItem")