Commit Graph

3098 Commits

Author SHA1 Message Date
Oliver
e62bf92bd6 Notifications work through page-reload / page-redirect
- Uses session storage
2018-04-29 23:47:16 +10:00
Oliver
b6665ec2a7 Added dismissable notifications
- Bootstrap alert
- Can close manually
- Also set to disappear after configurable time
2018-04-29 23:29:38 +10:00
Oliver
006aa69dbb Disable style check (for now!) 2018-04-29 22:08:35 +10:00
Oliver
46dea22cd4 Simplified part stock display 2018-04-29 22:07:58 +10:00
Oliver
f74e176579 JSON api for stock items 2018-04-29 21:02:40 +10:00
Oliver
9cc0780367 Sidenav toggles 2018-04-29 20:30:34 +10:00
Oliver
3403af18c8 Trackable items must have serial number set 2018-04-29 17:06:22 +10:00
Oliver
feb45513f7 Prevent serial number for stock item with quantity > 1 2018-04-29 13:20:02 +10:00
Oliver
9ea3d7bf71 Build tab shows active builds 2018-04-29 13:11:31 +10:00
Oliver
aca0d236ee Javascript consolidation 2018-04-29 12:25:07 +10:00
Oliver
55310be393 Display part stock in build detail window 2018-04-28 23:32:03 +10:00
Oliver
8d0789c37c Implemented tree view
Using library bootstrap-treeview
- part category tree
- stock location tree
- Currenly is functional but looks terrible
2018-04-28 23:22:12 +10:00
Oliver
095492203f Simplified javascript templating
- Load js modules in block js_load
- Write $(document).ready script in block js_ready
- Write any other js in block_js
2018-04-28 12:45:12 +10:00
Oliver
7ebb723d15 Revert "Set initial value fields to disabled for some forms"
This reverts commit c1271367bd.
2018-04-28 12:19:50 +10:00
Oliver
c1271367bd Set initial value fields to disabled for some forms
- Prevent user from changing certain fields
- Only when a form is launched from a particular view
2018-04-28 12:14:18 +10:00
Oliver
2e7253ebc4 Tweak javascript for category detail pages 2018-04-28 11:43:26 +10:00
Oliver
bc597d7c21 Style fixes 2018-04-28 01:16:47 +10:00
Oliver
0dcdce82f8 Modals dialogs for 'Build' 2018-04-28 01:06:42 +10:00
Oliver
c1c16bd013 Merge branch 'bom-check' 2018-04-28 00:06:48 +10:00
Oliver
1df42b2397 Sanity checking for StockItem
- If a SupplierPart is selected, it must point to the same Part type as the Part field!
2018-04-28 00:06:39 +10:00
Oliver
f49474ace5 Prevent recursive BOMs
- If A has B in its BOM, A cannot be added to the BOM of B
2018-04-27 23:42:23 +10:00
Oliver
06f9c67b11 Prevent part from adding itself as a BOM item 2018-04-27 23:23:44 +10:00
Oliver
1b5dbfbe26 Reload page when adding BOM item to part 2018-04-27 23:14:25 +10:00
Oliver
4d6e2aca2c Modal forms for stock app 2018-04-27 22:59:08 +10:00
Oliver
b705f3c62a Merge remote-tracking branch 'origin/master' 2018-04-27 22:51:17 +10:00
Oliver
3de80fe059 Modalized 'new-supplier-part' from supplier page 2018-04-27 22:14:25 +10:00
Oliver
4794714a09 Modal form for company-delete 2018-04-27 22:07:11 +10:00
Oliver
36cf946a78 Modal for company create
- Ajax modals now return the URL of the item they are operating on
- passing {follow: true} to the modal caller will go to that URL on success
- footable'd company list
2018-04-27 21:58:22 +10:00
Oliver
c4e305bde6 Loaded both modals into single include 2018-04-27 21:35:36 +10:00
Oliver
e1e3cc71e6 More modal forms
- supplier-part-edit
- supplier-part-delete
2018-04-27 21:32:48 +10:00
Oliver
bc3dca3aba Modal for edit and delete part category 2018-04-27 20:42:12 +10:00
28e6d50f08 Check for null StockItem location 2018-04-27 09:33:05 +10:00
Oliver
5162c1d11f Inline deletion for BOM items 2018-04-27 00:54:01 +10:00
Oliver
507e3de05b Generecised launchModalForm
- Add 'options' e.g. redirect / data
2018-04-27 00:16:54 +10:00
Oliver
784b0dec02 Added AjaxDeleteView
- AjaxDeleteView handles ajaxified delete GET and POST events
- Added modal deletion window
- Added launchDeleteForm jQuery function
2018-04-27 00:06:44 +10:00
Oliver
9fd275ed3e Part Edit view now ajaxified 2018-04-26 23:28:27 +10:00
Oliver
c0902626f4 footable working with BOM items
- Event delegation to capture 'edit' button
2018-04-26 23:05:35 +10:00
Oliver
8aa6dbdb04 Improved display of checkbox in forms
Still not quite right, but a lot better
2018-04-26 22:43:25 +10:00
Oliver
b4ff8f79f0 Fixed position header + footer for modals
- Fun with CSS!
- Header title provided by AJAX data
- Footer static
- Submit button text can be customized via JSON dat
2018-04-26 22:38:48 +10:00
Oliver
8c9442193b Enable escape-key dismiss for modal 2018-04-26 18:27:28 +10:00
Oliver
280f2c36cb Modal form for part creation 2018-04-26 18:22:41 +10:00
Oliver
d02b6f3583 Added scroll-bar to long modals
Required to fix a bug in select2 where select boxes are drawn incorrecly in a long scrolling modal. 
Enforcing a scrollbar for overflow prevents this (magic)?

Ref: https://github.com/select2/select2/issues/3897
2018-04-26 18:22:14 +10:00
Oliver
59ea4a3a24 Auto-scroll modal to top when opened 2018-04-26 18:19:41 +10:00
Oliver
5f19b37c6e Added 'select2' to modal foms
- Drop down lists are now text filterable
- Yay for libraries
2018-04-26 17:37:23 +10:00
Oliver
3c17777114 Merge branch 'modal-forms' 2018-04-26 09:26:52 +10:00
Oliver
e395d89a7f Fix issues for AjaxUdpateView
- Works properly now!
- Can edit BOM item inline
- Can add BOM item inline too
2018-04-26 09:26:43 +10:00
Oliver
55e7f365df Added AjaxUpdateView class
Also cleaned up the modal form javascript
2018-04-26 08:18:53 +10:00
Oliver
99743c6bd0 Modal form now working on multiple pages
- Part index
- Part category detail page(s)
2018-04-25 15:34:12 +10:00
Oliver
e3b2bd7129 Abstracted jquery code to load a modal form
- static/scripts/modal_form.js
- bindModalForm function takes care of the mechanics
2018-04-25 15:28:57 +10:00
Oliver
ab05c6ce1e Updated AjaxCreateView
- Return PK of newly-created object
- Populate fields with initial values as necessary
2018-04-25 15:27:23 +10:00