summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-09-20Add start of single-pad viewMalf Furious5-0/+130
2018-09-20pad: Fix bug in function getStages()Malf Furious1-0/+3
In cases where the pad had no stages beneath it, `new stage($this->stage)` would construct an invalid object. As it turns out, calling ->getArray() on an uninitialized stage object yeilds bad results. Instead of patching the stage::getArray() function, I add a check to harden pad::getStages(). My reasoning for this is as follows: The bug in getArray() manifests from a domain error, ie. it's only because we are calling it on an uninitialized object. The object is already in a bad state prior to caling getArray(). Rather, I opt to patch getStages() so that we never create a bad object in the first place. Now, for no-stage pads, getStages() will return early an empty array.
2018-09-20table: Fix bug in constructorMalf Furious1-2/+2
This particular flaw was dampening (and could popentially be hiding) the effects of other bugs. For instance, in this case, a GUID of "" was invalidly being used to construct an object. This should obviously be considered an error, but since "" evaluates to false, the construction was treated as default (no GUID) construction and succedded. It wasn't until later when missing properties were accessed that random PHP error messages clued me into what was happening. Now, when any sort of explicit value is used to construct an object (not NULL), an object load will be attempted, giving bad input more chances to fail outright and trigger an exception. In addition, the 'no such guid' exception message is updated to place quotes ('') around the GUID string to make it more obvious when "" is used in the future.
2018-09-19stdpage: Update user button appearanceMalf Furious1-1/+8
Removed placholder text and now displaying the logged-in user's display name. This is accopanied by the user icon and (conditionally) the 'cool' sunglasses icon for admins. This is similar, but not identical, to the markup of my old archived code I'm clearing out.
2018-09-19stdpage: Add additional spacing to "Not Logged In" textMalf Furious1-1/+1
This additional spacing is added to the navbar text to improve its appearance in the browser.
2018-09-19datamods: Add default stages to new padsMalf Furious1-0/+6
As a convenience, I'm adding a basic set of stages to new pads. These stages are "To Do", "In Progress" ('Done' being closed issues). This implements a very simple workflow for new pads.
2018-09-19table: Change function visibilities to publicMalf Furious1-2/+2
These two functions, 'getCurrentTimestamp()' and 'isGUID()' are updated to be public. There is actually no good reason for them to be private; I originally just never antisipated their use outside this class. I need isGUID() in index.php to help with page routing. Neither of these two functions have side effects of any kind nor any unexpected behavior, so there is no harm in going public.
2018-09-19globals: Remove single call assertions for setPage...() functionsMalf Furious1-12/+2
Removing these unnecessary checks. They are not protecting us from anything, only inconveniencing me in index.php.
2018-09-19settings: Implement user tab form submissionMalf Furious2-0/+103
2018-09-19Update all usage of saveFile()Malf Furious2-10/+9
Update all usage of saveFile() to use added saveIfFile() function, forwarding on the convenience to model code. Model code can pass in file field names, rather than $_FILES arrays directly.
2018-09-19globals: Add function saveIfFile()Malf Furious1-0/+15
This is an alternative function to globals' saveFile(), which allows model code to just pass in the name of the expected uploaded file, rather than requiring them to look up the file themselves. This is in line with my preference to encapsulate PHP superglobals access away from most of the codebase. Note that even if the user opts not to upload optional files, the associated file <input> field will still be present in $_FILES, with a special error code set (meaning 'no file uploaded') which setFile() ignores. It is only in the case of a malformed form submission that $_FILES will be missing the requested file field, prompting Scrott to throw an exception.
2018-09-19formctrl: Hidden field name should be in 'input' arrayMalf Furious1-1/+1
The input[ ] portion of the hidden field name had been left off. This commit fixes this bug.
2018-09-16Remove old contentMalf Furious3-373/+1
2018-09-16Remove old contentMalf Furious1-49/+0
2018-09-16Add settings modal and user settings tabMalf Furious2-3/+151
Updated old settings modal design, to incorporate added Scrott features. Reimplemented this modal in Scrott from archived code and have included it in the navbar.
2018-09-16Add hidden formctrlMalf Furious1-0/+5
2018-09-16Add object background preview widgetMalf Furious2-0/+46
Similar to objHeadCircle() but for displaying a bg img on page, rather than as the actual background.
2018-09-16Add function obj::hasHeadImg()Malf Furious1-0/+10
We can check for the existence of an object's background image by calling getBgImg(), since it returns NULL when there is no such image. But getHeadImg() behaves differently, returning a path to 'static/img/null.jpg' (via df.php) when there is no image, making it more difficult to tell. This function addresses this concern.
2018-09-15Add file formctrlMalf Furious1-0/+8
This ctrl is not POSTed as part of the input[] array, but as a standalone name.
2018-09-15Add checkbox formctrlMalf Furious1-0/+9
2018-09-15Add css class and help-block to text formctrlMalf Furious1-2/+6
2018-09-15Form ctrls should use the 'control-label' classMalf Furious1-2/+2
2018-09-15Add function oneStr()Malf Furious1-0/+15
The initial intended use case for this is applying the "active" and "in active" classes to the first tab to appear in the settings modal.
2018-09-15Add 'my pads' pageMalf Furious2-0/+60
2018-09-15Implement dm-pad-add form handlerMalf Furious1-0/+27
2018-09-12Add function agent::getAgentObj()Malf Furious1-0/+17
This is basically a constructor for agent. The actual type returned is a contrete agent.
2018-09-08Add 'New Pad' modalMalf Furious2-1/+61
2018-09-08Add owner dropdown to 'New Group' modalMalf Furious1-0/+14
2018-09-07Fix typoMalf Furious1-1/+1
2018-09-07Fix bug in function table->loadObj()Malf Furious1-1/+7
If a table query yeilds zero rows, we would still attempt to load the first (index zero) into $this, causing an error to be thrown by PHP. We are now checking the size of the results array first.
2018-09-07Merge branch 'feature/bs-select' into devMalf Furious4-0/+38
2018-09-07Include bootstrap-select from std pageMalf Furious1-0/+2
2018-07-27Track library Bootstrap-select v1.12.4Malf Furious3-0/+36
2018-07-26Remove TODO and placeholderMalf Furious1-3/+0
2018-07-26Add "My Groups" pageMalf Furious2-0/+60
2018-07-26Add group/pad list itemMalf Furious3-0/+186
UI module to use when listing out groups and pads. These will link to the group/pad page and display information about the object.
2018-07-26Update function obj::getMembers()Malf Furious1-2/+7
Added a $limit argument to specify a maximum number of results to return.
2018-07-24Add About Scrott modalMalf Furious1-0/+16
2018-07-24Move $user page object scopeMalf Furious1-1/+2
Since several routes will use the current $user as the PAGE_OBJECT, I'm just setting it once above most of the logic. Any route that needs something else can change it. There's a condition in the setPageObj() function that throws if we attempt to call it more than once. I'm thinking this can be removed it's not protecting from much.
2018-07-24Add call to setPageName()Malf Furious1-0/+1
2018-07-24Show PAGE_NAME in the navbar/pad selectMalf Furious1-1/+1
2018-07-24Add $_SCROTT['PAGE_NAME'] variable and getter/setterMalf Furious1-0/+30
The intention is for index.php to set this variable. This is the text (HTML) displayed on the button for the pad select dropdown in the nav bar. Basically the canonical name of the page we're on.
2018-07-22Fix bug with login handlerMalf Furious1-1/+1
Now reloading current path after successful login, instead of redirecting to app-root.
2018-07-22Update function location()Malf Furious1-3/+6
Passing no argument (or NULL) now causes this function to redirect to the 'app-path' (current request page). This is a way to reload the current page.
2018-07-22Add groups/pads page buttons to navbarMalf Furious1-0/+2
2018-07-22Fix bug in agent 'has permission' functionsMalf Furious1-0/+27
The check that this commit adds to each of these functions enables users with all permissions on themselves.
2018-07-22Fix bug in function agent::isOwner()Malf Furious1-1/+4
If the argument doesn't have an owner, then an access error is thrown when we try to do ->guid. Since there is no owner, just return false. Otherwise, do the comparision as usual.
2018-07-22Implement display of object page background imagesMalf Furious1-1/+12
2018-07-21Update index.php to set appropriate page objectsMalf Furious1-1/+2
2018-07-21Change errorlevel constantsMalf Furious1-3/+3