CSS Style Sheet & XUpload.js

XUpload related questions

Moderator: admin

Message
Author
Butch
Posts: 29
Joined: Sep 14, 2006 1:44 am
Location: USA
Contact:

CSS Style Sheet & XUpload.js

#1 Postby Butch » Sep 20, 2006 11:05 pm

Building html template to run XUpload pro version 2.2. I already have the tag "div" defined as the font color white in my site CSS Style Sheet which prints the javascript code of Description: and files choosen with a white font on a white background.

May I define the font color black in the xupload.js? And, would it go in this section of code?
...
new_row_button.value = 'Delete';

new_row.element = element;

new_row_button.onclick= function()
{
this.parentNode.element.parentNode.removeChild( this.parentNode.element );
this.parentNode.parentNode.removeChild( this.parentNode );
this.parentNode.element.multi_selector.count--;
this.parentNode.element.multi_selector.current_element.disabled = false;
return false;
};

new_row.appendChild( new_row_button );

currenttext=document.createTextNode(" "+fixLength(element.value));
new_row.appendChild( currenttext );

if(descr_mode)
{
var new_row_descr = document.createElement( 'input' );
new_row_descr.type = 'text';
new_row_descr.value = '';
new_row_descr.name = element.name+'_descr';
new_row_descr.className='fdescr';
new_row.appendChild( document.createElement('br') );
new_row.appendChild( document.createTextNode('Description:') );
new_row.appendChild( new_row_descr );
}
...

It would be great if someone would show me the line of code I would need to add in the above.

I'm fairly new to scripting, learning by following others code and experimenting with alot of trial an error.

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#2 Postby PilgrimX182 » Sep 21, 2006 9:05 am

Read your post some times, but not clear what text color you wanna change :D

1) You can play with .file_list style in upload_form.html

2) Here's the code to specify filename color:

in upload_form.html add new style:

Code: Select all

.fname  {color: #0f0;}


in xupload.js modyfy piece of code to this:

Code: Select all

new_row.appendChild( new_row_button );
currenttext=document.createTextNode(" "+fixLength(element.value));

var span1 = document.createElement( 'span' );
span1.className = 'fname';
span1.appendChild( currenttext );

new_row.appendChild( span1 );


Can change "Description:" style as well using same technique.

Butch
Posts: 29
Joined: Sep 14, 2006 1:44 am
Location: USA
Contact:

CSS Styles

#3 Postby Butch » Sep 21, 2006 5:08 pm

Thanks, the code above worked great for the file names, however the field name "Description" is still white. I apologize for not being clear in my previous post. I assume the same coding for "file names" will work as well for "Description:".

Has anyone provided any updated coding so that Safari will work correctly with the "Show upload status inside this table"?

Still testing Xupload Pro, seems to work well in all browsers on a PC, however not so well in IE 5.2 on a Mac (OS 10.4.7), Safari I'm still working on, found your coding to make "pop-up" window come to the front and that works great as well.

Have tried the following browsers: IE, Netscape, Opera, FireFox on both PC and Mac
Last edited by Butch on Sep 28, 2006 3:57 am, edited 1 time in total.

tubbly
Posts: 18
Joined: Sep 06, 2006 10:59 pm

#4 Postby tubbly » Sep 21, 2006 6:06 pm

Yes, there is a fix now - PilgrimX182 has also been working quickly to solve that problem over the last few days!

See the topic Inline windows and Safari

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#5 Postby PilgrimX182 » Sep 22, 2006 7:14 am

XUpload works fine on Mac in these browsers: Safari, Firefox, Opera, Camino, Shiira, iCab.

IE 5.2 for Mac is somethin terrible, probably the worst browser I've ever seen. I've figured out that it just won't let you create Input elements except text fields. So I've made kinda fix to skip adding new file fields in IE/Mac browser. At least upload will work with this.

in xupload.js add this line after "if(!checkExt(element))return;"

Code: Select all

if (navigator.appVersion.indexOf("Mac")>0 && navigator.appVersion.indexOf("MSIE")>0)return;


I think I will be able to create workaround for IE/Mac in near future.

User avatar
PilgrimX182
Posts: 2182
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

Re: CSS Styles

#6 Postby PilgrimX182 » Sep 22, 2006 7:19 am

Butch wrote:however the field name "Description" is still white. I assume the same coding for "file names" will work as well for "Description:".


Here's the code for description text, just replace this piece of code:

Code: Select all

if(descr_mode)
        {
            var new_row_descr = document.createElement( 'input' );
          new_row_descr.type = 'text';
          new_row_descr.value = '';
            new_row_descr.name = element.name+'_descr';
            new_row_descr.className='fdescr';
            new_row.appendChild( document.createElement('br') );
            var span2 = document.createElement( 'span' );
                span2.className = 'xdescr';
                span2.appendChild( document.createTextNode('Description:') );
            new_row.appendChild( span2 );
            new_row.appendChild( new_row_descr );
        }


and add .xdescr {...} style to your upload_form.html

Butch
Posts: 29
Joined: Sep 14, 2006 1:44 am
Location: USA
Contact:

Drescription Text

#7 Postby Butch » Sep 22, 2006 12:09 pm

The code for the text "Description" works great. A special thanks for all the hard work with the styles, pop-up and show in table.

It is my understanding that Microsoft has discontinued IE (5.2) for Mac, there are no plans for any future development of this browser, and with the new release of the Intel based Mac, OS 9 is no longer supported. I think we liked IE over Netscape in the older operating system, most of us wanted to stay with the browser we knew, however after a few days with the new OS X operating system I think most are moving on to Safari and FireFox, Safari is not very foregiving with code, I must say I do like the browser, and wish I could fix one problem with my website and Safari that I have worked on for months.

IE 5.2 on a Mac will upload a file, it just acts crazy, ..just my point of view.

Xupload is great, just the file upload I was looking for.

Great job PilgrimX182!!! :lol:


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests