Changeset 2487955
- Timestamp:
- 03/05/2021 03:00:16 PM (5 years ago)
- Location:
- piwi-warehouse
- Files:
-
- 170 added
- 6 edited
-
tags/3.1.1 (added)
-
tags/3.1.1/admin (added)
-
tags/3.1.1/admin/_common (added)
-
tags/3.1.1/admin/_common/common-api.php (added)
-
tags/3.1.1/admin/_common/common-hook.php (added)
-
tags/3.1.1/admin/_common/common.php (added)
-
tags/3.1.1/admin/_common/index.php (added)
-
tags/3.1.1/admin/_main (added)
-
tags/3.1.1/admin/_main/css (added)
-
tags/3.1.1/admin/_main/css/main.css (added)
-
tags/3.1.1/admin/_main/main-hook.php (added)
-
tags/3.1.1/admin/_main/main-ui.php (added)
-
tags/3.1.1/admin/_main/main.php (added)
-
tags/3.1.1/admin/admin.php (added)
-
tags/3.1.1/admin/caps (added)
-
tags/3.1.1/admin/caps/caps-hook.php (added)
-
tags/3.1.1/admin/caps/caps-ui.php (added)
-
tags/3.1.1/admin/caps/caps.php (added)
-
tags/3.1.1/admin/caps/class (added)
-
tags/3.1.1/admin/caps/class/index.php (added)
-
tags/3.1.1/admin/caps/class/walker-caps.php (added)
-
tags/3.1.1/admin/caps/css (added)
-
tags/3.1.1/admin/caps/css/caps.css (added)
-
tags/3.1.1/admin/caps/js (added)
-
tags/3.1.1/admin/caps/js/pwwh.admin.caps.ui.js (added)
-
tags/3.1.1/admin/consistency (added)
-
tags/3.1.1/admin/consistency/consistency-hook.php (added)
-
tags/3.1.1/admin/consistency/consistency-ui.php (added)
-
tags/3.1.1/admin/consistency/consistency.php (added)
-
tags/3.1.1/admin/consistency/css (added)
-
tags/3.1.1/admin/consistency/css/consistency.css (added)
-
tags/3.1.1/admin/index.php (added)
-
tags/3.1.1/core (added)
-
tags/3.1.1/core/capabilities (added)
-
tags/3.1.1/core/capabilities/caps-api.php (added)
-
tags/3.1.1/core/capabilities/caps.php (added)
-
tags/3.1.1/core/core-api.php (added)
-
tags/3.1.1/core/core-hook.php (added)
-
tags/3.1.1/core/core-ui.php (added)
-
tags/3.1.1/core/core.php (added)
-
tags/3.1.1/core/css (added)
-
tags/3.1.1/core/css/core.css (added)
-
tags/3.1.1/core/css/index.php (added)
-
tags/3.1.1/core/css/validate.css (added)
-
tags/3.1.1/core/index.php (added)
-
tags/3.1.1/core/items (added)
-
tags/3.1.1/core/items/class (added)
-
tags/3.1.1/core/items/class/index.php (added)
-
tags/3.1.1/core/items/class/walker-locations.php (added)
-
tags/3.1.1/core/items/css (added)
-
tags/3.1.1/core/items/css/index.php (added)
-
tags/3.1.1/core/items/css/item.css (added)
-
tags/3.1.1/core/items/index.php (added)
-
tags/3.1.1/core/items/item-ajax.php (added)
-
tags/3.1.1/core/items/item-api.php (added)
-
tags/3.1.1/core/items/item-caps.php (added)
-
tags/3.1.1/core/items/item-hook.php (added)
-
tags/3.1.1/core/items/item-list.php (added)
-
tags/3.1.1/core/items/item-ui.php (added)
-
tags/3.1.1/core/items/item.php (added)
-
tags/3.1.1/core/items/js (added)
-
tags/3.1.1/core/items/js/index.php (added)
-
tags/3.1.1/core/items/js/pwwh.item.delete.alert.js (added)
-
tags/3.1.1/core/items/js/pwwh.item.location.validate.js (added)
-
tags/3.1.1/core/items/js/pwwh.item.manage.submitdiv.js (added)
-
tags/3.1.1/core/items/js/pwwh.item.validate.js (added)
-
tags/3.1.1/core/js (added)
-
tags/3.1.1/core/js/index.php (added)
-
tags/3.1.1/core/js/jquery.validate.min.js (added)
-
tags/3.1.1/core/js/pwwh.core.extend.validate.js (added)
-
tags/3.1.1/core/js/pwwh.core.js (added)
-
tags/3.1.1/core/lists (added)
-
tags/3.1.1/core/lists/list-api.php (added)
-
tags/3.1.1/core/lists/list-hook.php (added)
-
tags/3.1.1/core/lists/list.php (added)
-
tags/3.1.1/core/movements (added)
-
tags/3.1.1/core/movements/class (added)
-
tags/3.1.1/core/movements/class/index.php (added)
-
tags/3.1.1/core/movements/class/movement-history-list.php (added)
-
tags/3.1.1/core/movements/class/movement-history.php (added)
-
tags/3.1.1/core/movements/css (added)
-
tags/3.1.1/core/movements/css/index.php (added)
-
tags/3.1.1/core/movements/css/movement.css (added)
-
tags/3.1.1/core/movements/index.php (added)
-
tags/3.1.1/core/movements/js (added)
-
tags/3.1.1/core/movements/js/index.php (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.add.items.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.common.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.delete.alert.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.holder.validate.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.manage.operations.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.manage.submitdiv.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.remove.items.js (added)
-
tags/3.1.1/core/movements/js/pwwh.movement.validate.js (added)
-
tags/3.1.1/core/movements/movement-ajax.php (added)
-
tags/3.1.1/core/movements/movement-api.php (added)
-
tags/3.1.1/core/movements/movement-caps.php (added)
-
tags/3.1.1/core/movements/movement-hook.php (added)
-
tags/3.1.1/core/movements/movement-list.php (added)
-
tags/3.1.1/core/movements/movement-ui.php (added)
-
tags/3.1.1/core/movements/movement.php (added)
-
tags/3.1.1/core/notes (added)
-
tags/3.1.1/core/notes/class (added)
-
tags/3.1.1/core/notes/class/index.php (added)
-
tags/3.1.1/core/notes/class/walker-notes.php (added)
-
tags/3.1.1/core/notes/css (added)
-
tags/3.1.1/core/notes/css/index.php (added)
-
tags/3.1.1/core/notes/css/note.css (added)
-
tags/3.1.1/core/notes/js (added)
-
tags/3.1.1/core/notes/js/pwwh.note.add.js (added)
-
tags/3.1.1/core/notes/js/pwwh.note.common.js (added)
-
tags/3.1.1/core/notes/js/pwwh.note.delete.js (added)
-
tags/3.1.1/core/notes/js/pwwh.note.edit.js (added)
-
tags/3.1.1/core/notes/js/pwwh.note.reply.js (added)
-
tags/3.1.1/core/notes/note-ajax.php (added)
-
tags/3.1.1/core/notes/note-api.php (added)
-
tags/3.1.1/core/notes/note-caps.php (added)
-
tags/3.1.1/core/notes/note-hook.php (added)
-
tags/3.1.1/core/notes/note-ui.php (added)
-
tags/3.1.1/core/notes/note.php (added)
-
tags/3.1.1/core/purchases (added)
-
tags/3.1.1/core/purchases/css (added)
-
tags/3.1.1/core/purchases/css/index.php (added)
-
tags/3.1.1/core/purchases/css/purchase.css (added)
-
tags/3.1.1/core/purchases/index.php (added)
-
tags/3.1.1/core/purchases/js (added)
-
tags/3.1.1/core/purchases/js/index.php (added)
-
tags/3.1.1/core/purchases/js/pwwh.purchase.add.items.js (added)
-
tags/3.1.1/core/purchases/js/pwwh.purchase.delete.alert.js (added)
-
tags/3.1.1/core/purchases/js/pwwh.purchase.edit.qnts.js (added)
-
tags/3.1.1/core/purchases/js/pwwh.purchase.manage.submitdiv.js (added)
-
tags/3.1.1/core/purchases/js/pwwh.purchase.remove.items.js (added)
-
tags/3.1.1/core/purchases/js/pwwh.purchase.validate.js (added)
-
tags/3.1.1/core/purchases/purchase-ajax.php (added)
-
tags/3.1.1/core/purchases/purchase-api.php (added)
-
tags/3.1.1/core/purchases/purchase-caps.php (added)
-
tags/3.1.1/core/purchases/purchase-hook.php (added)
-
tags/3.1.1/core/purchases/purchase-list.php (added)
-
tags/3.1.1/core/purchases/purchase-ui.php (added)
-
tags/3.1.1/core/purchases/purchase.php (added)
-
tags/3.1.1/index.php (added)
-
tags/3.1.1/languages (added)
-
tags/3.1.1/languages/index.php (added)
-
tags/3.1.1/lib (added)
-
tags/3.1.1/lib/css (added)
-
tags/3.1.1/lib/css/lib-backend.css (added)
-
tags/3.1.1/lib/index.php (added)
-
tags/3.1.1/lib/js (added)
-
tags/3.1.1/lib/js/postbox.submitdiv.js (added)
-
tags/3.1.1/lib/js/ui.form.js (added)
-
tags/3.1.1/lib/lib.php (added)
-
tags/3.1.1/lib/logger (added)
-
tags/3.1.1/lib/logger/index.php (added)
-
tags/3.1.1/lib/logger/logger.php (added)
-
tags/3.1.1/lib/ui (added)
-
tags/3.1.1/lib/ui/class (added)
-
tags/3.1.1/lib/ui/class/ui-flexbox-area.php (added)
-
tags/3.1.1/lib/ui/class/ui-flexbox.php (added)
-
tags/3.1.1/lib/ui/index.php (added)
-
tags/3.1.1/lib/ui/ui-admin.php (added)
-
tags/3.1.1/lib/ui/ui-flexboxes.php (added)
-
tags/3.1.1/lib/ui/ui-form.php (added)
-
tags/3.1.1/lib/ui/ui-postbox.php (added)
-
tags/3.1.1/lib/utils (added)
-
tags/3.1.1/lib/utils/index.php (added)
-
tags/3.1.1/lib/utils/utils.php (added)
-
tags/3.1.1/piwi-warehouse.php (added)
-
tags/3.1.1/readme.txt (added)
-
tags/3.1.1/templates (added)
-
tags/3.1.1/templates/script.template.js (added)
-
trunk/core/items/item-api.php (modified) (1 diff)
-
trunk/core/movements/js/pwwh.movement.common.js (modified) (2 diffs)
-
trunk/core/movements/movement-ui.php (modified) (1 diff)
-
trunk/core/purchases/purchase-ui.php (modified) (1 diff)
-
trunk/piwi-warehouse.php (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
piwi-warehouse/trunk/core/items/item-api.php
r2438298 r2487955 22 22 function pwwh_core_item_api_get_item_by_title($title) { 23 23 24 $item = get_page_by_title($title, OBJECT, PWWH_CORE_ITEM); 25 26 if(is_a($item, 'WP_Post')) { 27 return $item; 24 if($title) { 25 $args = array('post_type' => PWWH_CORE_ITEM, 26 'posts_per_page' => -1, 27 'post_status' => 'publish', 28 'title' => $title); 29 $items = get_posts($args); 30 if((count($items) == 1) && is_a($items[0], 'WP_Post')) { 31 return $items[0]; 32 } 33 else if(count($items) > 1) { 34 $msg = sprintf('Multiple item with the same name in %s()', __FUNCTION__); 35 pwwh_logger_append($msg, PWWH_LOGGER_EFLAG_CRITICAL); 36 $msg = sprintf('The name is: %s', $title); 37 pwwh_logger_append($msg, PWWH_LOGGER_EFLAG_CRITICAL); 38 return false; 39 } 40 else { 41 return false; 42 } 28 43 } 29 44 else { -
piwi-warehouse/trunk/core/movements/js/pwwh.movement.common.js
r2438298 r2487955 82 82 let status = pwwhCoreGetStatus(loc_obj.post.type); 83 83 let label; 84 if(status != active) {84 if(status == 'concluded') { 85 85 label = loc_obj.ui.button.publish.label.activate; 86 86 } 87 else if((status == 'draft') || (status == 'auto-draft')){ 88 label = loc_obj.ui.button.publish.label.confirm; 87 89 } 88 90 else { 89 label = loc_obj.ui.button.publish.label.update 91 label = loc_obj.ui.button.publish.label.update 90 92 } 91 93 … … 108 110 let status = pwwhCoreGetStatus(loc_obj.post.type); 109 111 let label; 110 if(status != concluded) {112 if(status == 'active') { 111 113 label = loc_obj.ui.button.publish.label.conclude; 112 114 } 115 else if((status == 'draft') || (status == 'auto-draft')) { 116 label = loc_obj.ui.button.publish.label.confirm; 117 } 113 118 else { 114 label = loc_obj.ui.button.publish.label.update 119 label = loc_obj.ui.button.publish.label.update 115 120 } 116 121 -
piwi-warehouse/trunk/core/movements/movement-ui.php
r2438298 r2487955 435 435 436 436 /* Generating Item box. */ 437 $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1); 437 $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1, 438 'post_status' => 'publish'); 438 439 $id = $instance . ':' . $ui_facts['input']['item']['id']; 439 440 $dl_data = get_posts($args); -
piwi-warehouse/trunk/core/purchases/purchase-ui.php
r2438298 r2487955 310 310 311 311 /* Generating Item box. */ 312 $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1); 312 $args = array('post_type' => PWWH_CORE_ITEM, 'posts_per_page' => -1, 313 'post_status' => 'publish'); 313 314 $id = $instance . ':' . $ui_facts['input']['item']['id']; 314 315 $dl_data = get_posts($args); -
piwi-warehouse/trunk/piwi-warehouse.php
r2438298 r2487955 14 14 * Plugin URI: 15 15 * Description: Warehouse manager. 16 * Version: 3.1. 016 * Version: 3.1.1 17 17 * Author: Piwi Graphics 18 18 * Author URI: http://piwi.graphics/ -
piwi-warehouse/trunk/readme.txt
r2438326 r2487955 3 3 Tags: warehouse, management system 4 4 Requires at least: 5.0 5 Tested up to: 5. 65 Tested up to: 5.7 6 6 Requires PHP: 7.2 7 7 Stable tag: 3.0 … … 38 38 == Changelog == 39 39 40 = 3.1.1 = 41 * BUG: Fixed wrong label for the movement publish button (bug #27). 42 * BUG: Fixed Wrong locations list when a draft item with a duplicated name is 43 saved (bug #26). 44 40 45 = 3.1.0 = 41 46 * NEW: Purchases are now tied to the locations: when purchasing an item, it is 42 required to assign a destination. Item locations are automatically43 assigned on a Purchase. Validation mechanism have been changed.47 required to assign a destination. Item locations are automatically 48 assigned on a Purchase. Validation mechanism have been changed. 44 49 * NEW: Extended Item Record postbox to handle the availability per location. 45 50 * NEW: Item availabilities are now tied to location. Aside of the total 46 availability, each item has an availability per location.51 availability, each item has an availability per location. 47 52 * NEW: Implemented a new notes system for Purchase an Movement 48 * NEW: Improved Post Submit Box management 49 * BUG: Fixed issue with capability page restore action (bug #25) 50 (backported to 3.0.1). 53 * NEW: Improved Post Submit Box management. 51 54 52 55 = 3.0.1 = … … 57 60 the various part of the system 58 61 * NEW: Introduced a new engine to manage the back-end pages 59 * BUG: Fixed issue with item titles (bug #24)(backported to 2.0.1).60 * BUG: Fixed issue which prevent deletion of first movement item (bug #23)61 (backported to 2.0.1).62 * BUG: Fixed misuse of a variable in Item Type column (bug #22)63 (backported to 2.0.1).64 * BUG: Fixed vrong aphostrope management in Item title (bug #21)65 (backported to 2.0.1).66 * BUG: Fixed a check in History insert to ensure an error log when Holder ID67 is NULL (bug #20) (backported to 2.0.1).68 * BUG: Fixed issue in History insert when movement transitate from active to69 something else (bug #19) (backported to 2.0.1).70 62 71 63 = 2.0.2 = … … 103 95 * BUG: Fixed post date button style issue (bug #14). 104 96 * BUG: Fixed wrong sorting of Balance, Purchase and Movement title column of 105 Post List (bug #13).97 Post List (bug #13). 106 98 * BUG: Fixed error in Shelfmark/Type column of Item List (bug #12). 107 99 … … 116 108 * NEW: Added Settings page. 117 109 * NEW: Improved admin sub-menu order. 118 * NEW: Added Item related css for minor style improvements119 (backported to 1.0.1).120 * BUG: Fixed unescaped attribute in prefilled item metabox (bug #10)121 (backported to 1.0.1).122 * BUG: Improved update lent js (bug #9) (backported to 1.0.1).123 * BUG: Fixed Conclude button not properly internationalized (bug #8)124 (backported to 1.0.1).125 * BUG: Fixed extra div when no featured is available in info box (bug #7)126 (backported to 1.0.1).127 * BUG: Fixed misleading submit div title (bug #6) (backported to 1.0.1).128 * BUG: Fixed purchase quantity error message (bug #5) (backported to 1.0.1).129 * BUG: Fixed item datalist limit (bug #4) (backported to 1.0.1).130 * BUG: Fixed wrong initialization of Item amount and availability (bug #3)131 (backported to 1.0.1).132 * BUG: Fixed wrong translation (bug #2) (backported to 1.0.1).133 * BUG: Fixed wrong JS inclusion and removed old files (bug #1)134 (backported to 1.0.1).135 110 136 111 = 1.0.2 =
Note: See TracChangeset
for help on using the changeset viewer.