Results 1 to 7 of 7

Thread: change the ext web desktop background

  1. #1

    Default change the ext web desktop background

    i want to do something like preference in this example
    http://www.qwikioffice.com/desktop-demo/
    at least to able the user to change the desktop background image from the available images
    but really i couldn't understand the code of this example in this point
    i don't know exactly from where i should start to understand
    I did more searches here for explanation of this point using (extjs,php) but i didn't find anything useful for me

    any help?!!!!!?

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    You can try this out in the \examples\desktop\sample.js file:

    Code:
        getStartConfig : function(){
            return {
                title: 'Jack Slocum',
                iconCls: 'user',
                toolItems: [{
                    text:'Settings',
                    iconCls:'settings',
                    scope:this,
                    handler: function()
                    {
                      Ext.getBody().setStyle('background-image', 'url(./wallpapers/sky.jpg);');
                    }
                },'-',{
                    text:'Logout',
                    iconCls:'logout',
                    scope:this,
                    handler: function()
                    {
                      Ext.getBody().setStyle('background-image', 'url(./wallpapers/desk.jpg);');
                    }
                }]
            };
        }

  3. #3

    Default

    it's work but actually i want something else... i want to give the set style url from the selected image....
    Code:
    Ext.getBody().setStyle('background-image', 'url(wallpapers/sky.jpg)')
    i want to use something like image chooser
    http://www.extjs.com/deploy/dev/examples/view/chooser.html
    as a simplest way; but it doesn't work also on local ... (no images)!!! i don't know way although it was work without problems!!!!!!!

    anyway i want to add this image data view and when the user select the image (if it will display) i get the url of this image and send it to setStyle(...)
    it's just my idea for this point, am sure there are ideas better than mien
    i hope that i explained it well!!


    really, thank you for your response

  4. #4

    Default

    NO IDEA???!!!!!!

  5. #5

    Default i got the problem:(

    i got the problem but unfortunately i didn't get the solution ... the problem is that All the exampls use .json can not display the data (display only an empty grid) on all browsers
    i use WAMP server ... i don't know why it was display and now nooo... i didn't change any configuration!!!!
    any one help me please...

  6. #6
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    NO IDEA???!!!!!!
    No need to shout, especially since you only posted your original question less than 24 hours ago. For more a *immediate* response try a Support Subscription.

    1. If you want to use something like the Image Chooser (on your system/server), it's very easy to change the example code to:

    Code:
    function insertImage(data)
    {
      Ext.getBody().setStyle('background-image', 'url(' + data.url + ')');
      btn.focus();
    };
    2. If you want the user to be able to select an image from their local system, I'd recommend that you get them to upload the image to your server, and from there you can apply it to the background-image. There are several extensions for uploading files, and many posts in the forums - try searching for "image upload" or "file upload".

  7. #7

    Default

    Quote Originally Posted by fay View Post
    No need to shout, especially since you only posted your original question less than 24 hours ago
    i didn't mean to shout i am sorry

    1. If you want to use something like the Image Chooser (on your system/server), it's very easy to change the example code to:

    Code:
    function insertImage(data)
    {
      Ext.getBody().setStyle('background-image', 'url(' + data.url + ')');
      btn.focus();
    };
    i will try to change the example code.... but i don't want uploading at least now
    all the examples that display images use json so i can't get this point well, that is all

    really; thank you for your quick response...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •