Commit Graph

455 Commits

Author SHA1 Message Date
Matt Pass
aa6cfcc76e No need for if condition here
Removed if checks and else conditions in a couple of places
2012-09-19 08:42:11 +01:00
Matt Pass
924919fb6f No need for if condition now
You can only see multiple results if logged in, so no need for this if
condition
2012-09-19 08:40:37 +01:00
Matt Pass
15b4793d32 bannedFiles changed
Now just hide _coder and ICEcoder folders to hide ICEcoder itself from
the file manager
Users can now see everything else
2012-09-19 08:38:55 +01:00
Matt Pass
22a1305cb1 Cannot view if not logged in
No need to check for loggedIn anymore, you simply cannout view this page
if not logged in
Removed login param from init() function call
2012-09-19 08:35:43 +01:00
Matt Pass
7c3cc891f3 Remove if condition
No longer showing ICEcoder if we're not logged in, so no need for if
else
2012-09-19 08:33:47 +01:00
Matt Pass
e2aefab2ae SESSION userLevel now loggedIn
Moving away from the idea of multiple user levels, users will either
have full access or no access
Swapped all userLevel session vars to a loggedIn var, which is a bool
Makes things simpler and paves the way towards the new login screen
(before you see any files, code etc)
2012-09-18 08:53:13 +01:00
Matt Pass
4027ecee5a Use strpos instead of strstr
Instead of just finding our dirname within the finalArray using strstr,
now using strpos and detecting if it's pos 0, which is much more
appropriate & reliable.
Example: Looking for /bob/t1.txt for may potentially return a false
positive for finding '/bob' in '/another/bob1/abc' and files therefore
t1.txt ends up in the wrong folder. This false positive only occurs when
the write order of hard drive storage has stored another/bob1/abc before
/bob and therefore retrieval load order can cause this odd, occasional
issue.
Checking for /bob being the start of our finalArray item through
strpos===0 eliminates this possibility.
2012-09-16 10:25:14 +01:00
Matt Pass
b1ca05fec3 Dynamic scoll height, undo URI encoding, use vars
resultsPane id setup. This then allows us to change the height to fill
more of the popup if we don't have replaceAll button at the bottom.
Establish findText in both PHP and JS (they need different sources for
their values unfortunately)
(JS for encoding simplicity by just using input field value and PHP to
get GET value as it can't pick up the parent input field value)
Use findText in both JS and PHP variations where appropriate
2012-09-14 18:02:45 +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
2c1e032f38 Set the recommended default of h:auto & o:visible
Not that this works without a container.
Could investigate wrapping in a 100% high container instead?
2012-09-13 18:13:42 +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
8715f79251 Reverting ternary statement
Not sure why the ternary version here isn't working, reverted to an if
else
2012-09-11 09:29:34 +01:00
Matt Pass
d8ff32f888 Version 0.8.4 v0.8.4 2012-09-09 17:04:52 +01:00
Matt Pass
d0315891b7 UTF-8, ternary switching & condensing code
Added UTF-8 charset metatag
Ternary switching instead of if else
Condensing 2 if statements into 1
Removed old commented line
2012-09-09 17:03:40 +01:00
Matt Pass
a796dc2376 Condensing & improving code
Simplifying & condensing code in a number of areas
Checking for changed content using indexOf
showFileMenu function to handle continuing to show file menu
(used when moving mouse over options to stop it dissapearing)
Condensing multiple <?php ?> blocks
File manager icons now using classes rather than inline styles
Ternary if condition
2012-09-09 16:45:37 +01:00
Matt Pass
eb4cc629a3 File manager icon classes added
Instead of using inline styles
2012-09-09 16:39:57 +01:00
Matt Pass
280320ef9a Now using ICEcoder iconset & default class
Use ICEcoders default iconset to save 7kb
Adjust all CSS BG positions to match this image now
Add ext-file to handle default (unsupported) filetypes
2012-09-09 16:00:19 +01:00
Matt Pass
328ddeb46d Beautify, define filetypes & use default
Unminify for user readability, can uglify in production use
Add fileTypesArray to define supported filetypes
If we have a file without a supported filetype, use ext-file as default
2012-09-09 15:58:06 +01:00
Matt Pass
13df2cb182 Remove icons
Using ICEcoder iconset now to save bytes
2012-09-09 15:50:44 +01:00
Matt Pass
bf73a03125 Simplify building up previousFiles
Using implode to create CSV within JS array block
Added 'v ' to title tag
2012-09-08 19:50:10 +01:00
Matt Pass
8c98e13984 Version number is now numeric only
Removed 'v ' prefix from version number so it can be evaluated in
conditions easier
Hardcoded 'v ' before all places where the version number is shown
No longer need to ltrim 'v ' from the version number
2012-09-08 19:34:25 +01:00
Matt Pass
c159e9326e Now checks for updates by default 2012-09-08 19:23:43 +01:00
Matt Pass
662bd1188d ltrimming 'v ' on version num, put back in
Needed to leave the ltrimming of 'v ' from the version number, put back
in
2012-09-08 19:23:22 +01:00
Matt Pass
b3e57075de No longer trimming 'v ' & clearer syntax on cmv
The latest version number doesn't have a 'v ' prefix now
Altered the syntax when checking cmv to make it shorter & clearer
2012-09-08 19:08:18 +01:00
Matt Pass
c6a08896f0 Condensing code, UTF-8 and messages on load
Check for IP address or * in array via in_array
Shorten long vars to $icv and $cmv in checking for updates
UTF-8 char set added to head
$updateMsg set if there is a newer version and this triggered onload
2012-09-08 18:50:24 +01:00
Matt Pass
8cfe6b557c Removing spaces from 4 x CSVs before use
Before saving the values, remove spaces from CSV values provided by user
Also covering the same thing in the 4 x session arrays & arrays that are
created
2012-09-08 17:23:58 +01:00
Matt Pass
8ce1da9485 Shortening a few vars and 2 x if conditions 2012-09-08 17:15:17 +01:00
Matt Pass
c44b1689b3 Remove padlock to simplify look
No longer showing padlock next to hidden files, looks cleaner & simpler
2012-09-08 15:09:43 +01:00
Matt Pass
dcf2571437 Show found instance count
Now showing number of times our find string is found in a file
2012-09-08 15:05:30 +01:00
Matt Pass
c9aca08d4e readdir created theme array, fix to for counter
Instead of using a hardcoded array, we are now generating this from CSS
files in the CodeMirror theme folder
Need to count the array length, not 1 less than it (2 places)
2012-09-08 15:04:06 +01:00
Matt Pass
fe8486d456 Switching to use new filetypes
files-arrow.gif now .png
nav-bg-gif now .jpg x 2
2012-09-08 15:00:27 +01:00
Matt Pass
b31dc5fb16 Saved bytes by using a JPG instead of GIF 2012-09-08 14:59:11 +01:00
Matt Pass
160ee475fd Removed, no longer wanted next to files 2012-09-08 14:58:20 +01:00
Matt Pass
dca9e6a88a GIF now a PNG to save bytes, also more subtle
Mid-grey instead of white
2012-09-08 14:57:11 +01:00
Matt Pass
4172f7d157 Don't like this theme, removed 2012-09-08 14:56:06 +01:00
Matt Pass
7a2275b3fb Resaved as web version, smaller 2012-09-08 14:55:18 +01:00
Matt Pass
76ac21a92d info now readme, better & shorter description 2012-09-08 14:54:46 +01:00
Matt Pass
f21012202f Removed file, not needed
Don't need to include this in ICEcoder really
2012-09-08 14:54:08 +01:00
Matt Pass
c0eb4172a2 Version no now at v 0.8.3 v0.8.3 2012-09-07 17:31:58 +01:00
Matt Pass
2ed832c729 Param adjust and setting up functions for process
Not refering to a number when calling replaceInFileSingle, instead set
file ref as a string param
replaceInFileSingle simply sends the fileRef and find & replace values
to the new replaceInFile function so it can begin it's process
replaceInFilesAll runs through all files in the foundArray and calls
replaceFileInSingle repeatedly with the fileRef
When it's finished running through all files, it hides the blackMask,
returning to the usual view
2012-09-07 17:31:25 +01:00
Matt Pass
bfbf84ca24 New action process added for replaceText
Upon replaceText being needed, we detect if we have a high enough
userLevel and if it's writable, if not provide an appropriate message to
the user
Otherwise - read, replace and save the new content with the find/replace
combo requested
Clear the server message and item from the queue
2012-09-07 17:25:56 +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
be0c8088ce Make ICEcoder avail in PHPGrey, check res & ban
Make global ICEcoder var avail to be used in PHPGrep function
If the user isn't logged in, check if the file we're considering showing
is a restricted file and if so set rFile = true
Syntax fixed - swapped strpos params round (needle, haystack)
2012-09-07 07:09:00 +01:00
Matt Pass
c36b7d842d iceRoot & docRoot set if level 10
Available for use if user is logged in
2012-09-07 07:08:42 +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
f7e1ce7b50 Find in files done, replace in files half done
Now detects if we're finding in filenames, files or otherwise, open docs
Extra else condition to handle finding in files
Uses a Grep like technique to recursively find in files and build up a
string
(Need to get the exclusion of restricted and banned files working)
It then displays the results in the results display DIV once we have a
list build up
File paths are dropped into foundArray
These can then be used by 2 x new functions to replace and replace all
(This final part is to be done)
2012-08-30 08:03:40 +01:00
Matt Pass
dab73a3eb2 zip is now a restricted file
Incase it has contents where you don't want to give public access
2012-08-30 07:59:13 +01:00
Matt Pass
24fe2bb81e serverType defined in settings and in a beter way
Instead of detecting a : in the path, now detect by server software name
This is now being done in settings file so it can be used elsewhere too
2012-08-30 07:58:07 +01:00