Commit Graph

105 Commits

Author SHA1 Message Date
Matt Pass
642db4c5b9 Renamed to properties.php & css 2012-10-09 07:57:28 +01:00
Matt Pass
2a93778df7 First sort of file into logical sections 2012-10-09 07:49:03 +01:00
Matt Pass
ee0303dc06 Code condensing
pB var setup to avoid repeating long DOM elem refs again
Removed end point from substr, not necessary
Put 3 x themes into an array and test using indexOf instead
Syntax spacing in a couple of areas
2012-10-08 07:37:08 +01:00
Matt Pass
0d55f3bd81 use showHide, fix availability bug & use regex
use showHide function where possible
Check file and fileName are available before using them
Shorten code by setting in vars and reusing
Syntax & comment simplification
Use regex to work out previousFiles (also fixed comma prefix on string)
Slight adjustment to for loop using less chars
2012-10-06 18:06:01 +01:00
Matt Pass
0e377c1aff New regex for efficiency
More specific regex used to ensure efficiency & speed are optimal
Syntax spacing adjusts on couple of other lines
2012-10-06 15:43:23 +01:00
Matt Pass
388bd7cefa Improved regex on CSS values
Looks for hex, rgb/hsl-a or colour name values in their correct format
Need match ? match[0] : '' to handle no match scenarios
2012-10-05 15:41:58 +01:00
Matt Pass
8234b3b063 newTab now innerLI & better cssColorPreview code
newTab isn't a tab at all, it's inner contents of an LI, so now called
innerLI
2nd insertBefore should be inserting newText not newLI again
New code to get CSS values via regex
Now only showing the preview if the caretLocType is CSS
2012-10-04 18:10:18 +01:00
Matt Pass
573a07026d Simplifying and condensing code
No need to return cM in getcMInstance, just return the ternary value
Shortened a few comments for clarity & byte saving
No need to add length as 2nd param on substrs in a couple of places
newTab setup as string to be used in a couple of places
Ternary shortening on elemType
Converted ternary statement back to if else to byte save on 2 ternaries
Reversing bool on codeAssist var by using ! instead
break is shorter & better too, than increasing i's value to escape
2012-10-03 21:13:35 +01:00
Matt Pass
880e04d760 Anon objects & CM's searchCursor used, fixed nest
Now just usage anonymous objects inline instead of creating for single
use
(saves adding extra vars and is less code)
Removed findLen and replaceLen as only findLen was being used twice
Replaced how we find & replace by using CM's searchcursor
Fix to the selection on hover over nest items, doesn't need -1
(This is because I fixed CM's tagRangeFinder to include last line)
2012-10-03 19:39:11 +01:00
Matt Pass
683752762d Fix to 1st line charCount & simplifying endPos.ch
If our result is within the first line, add 1 to it to fix offset
No need to have ternary case for replace all, this is now done with a
regex
2012-10-03 08:03:51 +01:00
Matt Pass
79a78e0a58 Condensing and simplification
Reducing code in many areas by condensing and simplifying
2012-10-02 07:56:05 +01:00
Matt Pass
c33bea997a Lots of ternary & array check shortening
Shorting to ternary statements instead of if else statements in many
places
Checking indexOf on arrays to condense code here too
2012-09-30 17:33:34 +01:00
Matt Pass
a2f8d9bc43 Combo moveLine function & code condensing
moveLine(dir) func added as combo of moveLineUp and moveLineDown funcs
Move initialising vars to start of func
Used indexOf to check array for shortURL instead of for loop in 2 places
Improving/removing a few comments
Condensed code to now check if selectedFiles is empty or contains right
clicked file and also condensed code to use indexOf on array instead of
for loop
Don't need foundFile because of this condensing
Using ICEcoder ref for filesFrame and also showing dropdown higher up
(next to mouse pointer/inline with file/folder name)
2012-09-30 16:24:03 +01:00
Matt Pass
80d717b4dc Condensing code & new deselectAllFiles func
Syntax format improvements on fileManager function
selectFileFolder improvements:
- Removed a load of vars we no longer need & new tgtFile var added
- 2 x areas where we deselect files/folders now done via new function
- tgtFile now avail to avoid duplicate setup
- Other much more efficient and clearer processes setup to achieve same
result
New function added to deselect all files
Ternary shortening on colouring of selected/deselected files & folders
Swapped var order around
2012-09-30 14:55:59 +01:00
Matt Pass
e14a8df6a0 Check typeof parent and swap vars around
Checking state.curState.context can cause issues is state.curState
doesn't exist so just check state.curState instead
Swapped a couple of vars round to match order of usage in func
2012-09-29 17:15:09 +01:00
Matt Pass
4be0067852 htmlTagArray defined in top settings now
updateNestingIndicator now setup on a setInterval every 30 ms
(This is due to timing issues and solves this without being noticable)
Only if we have a context for the given tag build up the array
If so, reset htmlTagArray and build up the array again
This means we stick with the old array if we're in a script or style
block (for example)
Set the tagString to be the last item in the array
If caretLocType is JS, set the tagString to script
(This is because CodeMirror doesn't recognise this as a tag)
updateNestingIndicator now works by:
- checking if we have a cM instance and not in JS, Coffee etc filetypes
- gets token information for the very end of the document
- detects if it's className is an error or not to determin if the
nesting is broken
Fix to detecting the code type we're in as without -1, JavaScript is
ignored as it's array item 0
2012-09-29 17:02:30 +01:00
Matt Pass
c717dd7bba Revised version to establish htmlTagArray
Uses a method from Marijn Haverbeke to establish an array of nested
tokens
This means chars in the document don't need to be scanned and the array
worked out in a more complex way
It means quite a few lines can be condensed down to just 3
Also means it's far less expensive on the CPU, meaning there is no
sluggishness onCursorActivity on large documents (ie typing etc)
2012-09-28 17:35:42 +01:00
Matt Pass
e0a7893578 Highlight line on moving up/down
No longer setting the cursor ch position on moving line up/down
Instead now highlighting the line that has been moved
This is done via the new function highlightLine
2012-09-28 07:52:33 +01:00
Matt Pass
6df5adf0f1 Deselect file we're closing in the file manager 2012-09-27 18:07:11 +01:00
Matt Pass
c3dbc4187f Remove iceRoot from location & perms file path
Clear iceRoot from the beginning of location (needed for when you set
your own ICEroot), so it doesn't cause DOM ID issues/mismatches
Also remove it from the file path passed through to file-control when
changing perms when you have your own ICEroot and don't show in server
message either
2012-09-21 14:22:14 +01:00
Matt Pass
6c004c3010 Remove ICEroot from path
This is applied in file control and by not removing it we have 2 x dirs
2012-09-21 09:25:58 +01:00
Matt Pass
96054295a0 Condensing code in a few areas
Reworked detecting if it's a JS, CoffeeScript, Ruby, CSS or LESS file by
switching the indexOf around
Also performed indexOf on an array rather than looking at each array
item in a for loop
Ternary shortening of code in a few areas
2012-09-20 18:15:20 +01:00
Matt Pass
ce04ef36da setLayout on creating new tab
Won't have height set on the editor instance otherwise
2012-09-20 09:29:16 +01:00
Matt Pass
a32f04a4e3 Show load screen while waiting for multi results
Set visibility to visible until multiple-results.php has loaded
2012-09-19 23:36:46 +01:00
Matt Pass
7c718b5131 accountLogin and login related items removed
accountLogin removed as an aliasArray to create
login param not needed on init function
Remove the if & else condition depending on login, this is not done here
anymore
No need to set login, not there anymore
refreshFileManager no longer needs to take action on logging in, user
would already be logged in
2012-09-19 09:02:14 +01:00
Matt Pass
21ef12f143 URI encoding var with ICEcoder: prefix
Don't need cM anymore
Replace apostrophes with HTML entity value
If we have something that should be URI encoded, encode it but also with
an ICEcoder: prefix, so we know we need to unencode it
2012-09-14 17:48:16 +01:00
Matt Pass
6cf1def982 Don't mess with CSS, instead use API to set size
Instead of detecting & altering stylesheets, run through CM instances
and set the size
Needs to be done via setTimeout to avoid timing issues
2012-09-13 18:16:15 +01:00
Matt Pass
56887c9f1f Better checking of open files before loading
New isOpen function added
This receives a file ref (absolute or relative) and checks a relative,
pipe replaced version against the openFiles array
If it finds a match, the file is already open, it will return the array
position, otherwise return false
The openFile function now uses this array when attempting to open a file
It firstly checks if it's open or not, if it is, it will switch to that
tab, otherwise proceed to open it
autoOpenFiles no longer has to check for this, as it's handled by
openFile function anyway
2012-09-13 09:29:27 +01:00
Matt Pass
5747825c14 replaceInFile function added
New function added which takes 3 params for fileRef, find & replace
Adds a new job to the server queue with an action of replaceText and the
3 params
Also adds a serverMessage
2012-09-07 17:21:55 +01:00
Matt Pass
67cbc08b60 Don't autoload files that are already open
Check if files are already opened and if so, skip autoloading it
2012-09-07 07:09:16 +01:00
Matt Pass
74534641aa Extra param on webkitRequestFullScreen needed
Text input fields in fullscreen mode wouldn't allow alphanum chars. You
need this extra param to make that work OK.
2012-08-30 18:02:41 +01:00
Matt Pass
72386c94a9 Fix to selecting char range 2012-08-28 07:50:55 +01:00
Matt Pass
f69edba862 Set the activeLineBG colour on theme choice
#ccc for light BG themes, #000 for dark themes
2012-08-05 15:24:08 +01:00
Matt Pass
bea1afc01c 6 new shortcuts added
New shortcuts added for next/previous tab, move line up/down, new tab
and close tab
switchTab function now accepts a noFocus param to stop focusing on the
document
Fix to set the visibility on the content area when starting a new tab,
wasn't showing otherwise
Functions added for nextTab, previousTab, moveLineUp and moveLineDown
(Other 2 functions newTab & closeTab already exist)
helpScreen taller to accomodate the 6 new shortcuts
2012-08-05 14:32:30 +01:00
Matt Pass
7b5f5ae5ce Reset progress bar to 0% on reshowing load screen
Move webkit & moz animation CSS declarations to the style attribute on
progressBar span
Give the span an ID and on showing the loadingMask again, clear the
declaration
4ms later start it again so it starts from 0% again
2012-08-02 15:29:53 +01:00
Matt Pass
d1e2cf4850 Only apply height if we have the stylesheet
Check for cMCSS first before changing CSS height property
2012-08-02 10:36:10 +01:00
Matt Pass
81fc8495b2 openFiles array fixes
renameTab now targets the right array position (tabNum-1)
updateFileManager now adds a / in to the files path ref
2012-08-02 07:40:58 +01:00
Matt Pass
41e99372f7 Adding / for root location and on span 2012-08-01 20:16:30 +01:00
Matt Pass
9eebbc011e Path relaignment, no href and perms ID updating
Replacing pipes with slashes in oldName
Not setting href on a tag to stop snapping to top
Path references should be location + "/" + file (or pipe)
Also updating perms ID ref
2012-08-01 07:35:41 +01:00
Matt Pass
aae759c901 Path fixes, setting new file openFiles value
On adding a new file, need to also set the openFiles array value to
match the newly given filename
2012-07-30 17:28:27 +01:00
Matt Pass
7634f9c6d5 Path tweaks to fix errors & correct perms shown
No need to add add / to end of getInput dialog default
Double // replaced with / in error catching
Correct perms shown on update of file manager; 705 on folders, 644 on
files
if condition block tabbed to right depth, for syntax clarity only
2012-07-30 13:13:35 +01:00
Matt Pass
f1aa201425 Realigned and reworked adding & removing files
Due to new DOM structure and relative paths how we add new files &
folders, including how they're added into empty folders has been
realigned and reworked.
2012-07-30 07:56:06 +01:00
Matt Pass
a9dd713809 minFilesW adjustment & not setting account
minFilesW should be 14px not 15px (could just about see edge of icons)
Not setting account width. Wasn't really necessary and caused icons to
collapse into smaller space when file manager reduced in width.
2012-07-29 14:02:25 +01:00
Matt Pass
d67c25aab5 Ternary shortening & other optimisation
Ternary statements shortened where possible
Account now has it's width set too when setting layout
fmLock now moved into another DIV container, adjust marginLeft value
No need to add last argument to substr as we want up to the end
Few hex codes shortened
2012-07-29 13:51:39 +01:00
Matt Pass
5f5ebd12a4 shortURLStarts gone, close highlights & tweaks
Have removed shortURLStarts from everywhere, too problematic
Close button highlights on mouse hover
File refs used client side are relative/local now
(Means less messing with strings and better security)
fullPath now also gone for same reason
2012-07-27 12:10:47 +01:00
Matt Pass
9c6be944fc Conditional file highlighting, custom path tweaks
Now only highlight files in File Manager if link exists
shortURL is now basePath conditionally with shortURLStarts removed from
start also
Files stored in config.php are now full paths
(So autoOpenFiles function now no longer needs to prefix this)
2012-07-25 19:09:05 +01:00
Matt Pass
4eb6ffc618 openLastFiles triggering & cursor error catching
openLastFiles function now triggered from:
init (this is for reloads of the browser) and
refreshFileManager (for logins)
Also now only changing cursor if we have iFrames in DOM
2012-07-25 17:43:35 +01:00
Matt Pass
529f7198b1 replace indexOf with lastIndex on shortURLstarts
causes probs if you have the same term more than once in your path
(ie, var/www/mysite/www), previously took first www
Now takes last one and solves path issues in quite a few areas
2012-07-24 13:41:08 +01:00
Matt Pass
88cd0996ec Alter top CSS property to be 10px now not 80px
Because X & Y positions now picked up in iFrames
The top pos doesn't need so much added to it
2012-07-22 19:10:14 +01:00
Matt Pass
9d23e4cfba if condition checks for node existence first 2012-07-22 17:17:13 +01:00