facebook

Image Gallery

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #323004 Reply

    Yann
    Member

    hi ,
    i’ve a problem, i try to create an image gallery with this method
    http://www.photoswipe.com/latest/examples/04-jquery-mobile.html#Gallery1
    when i call directly from my iphone my script (.asp) the image gallery run as well.
    i tried to place this in my mobi file like that:

    if (newPageId=='#m1-galerie')
      {
      $("head").append(
           $(" <link href='/gallery/styles.css' type='text/css' rel='stylesheet'/>"));
     
      $("head").append(
           $(" <link href='/gallery/photoswipe.css' type='text/css' rel='stylesheet'/>"));
      callOtherDomain("http://m.resto.chrom.fr/galerie/gallery.asp","m1-galerie-ResultGalerie");
    
    
    }
      function callOtherDomain(url,target)
     {
        // native XMLHttpRequest object
     //alert(url);
       if (window.XMLHttpRequest) {
           req = new XMLHttpRequest();
           req.onreadystatechange = function() {ajaxDone(target);};
           req.open("GET", url, true);
           req.send(null);
       // IE/Windows ActiveX version
       } else if (window.ActiveXObject) {
           req = new ActiveXObject("Microsoft.XMLHTTP");
           if (req) {
               req.onreadystatechange = function() {ajaxDone(target);};
               req.open("GET", url, true);
               req.send();
           }
       }
           setTimeout("ajax(page,'scriptoutput')", 10000);
    
    }
    function ajaxDone(target) {
       // only if req is "loaded"
        phoneui.showActivityDialog('Chargement...');
       if (req.readyState == 4) {
           // only if "OK"
             if (req.status == 200 || req.status == 304) {
               results = req.responseText;
               document.getElementById(target).innerHTML = results;
           } else {
               document.getElementById(target).innerHTML="Erreur veuillez recharger la page SVP."
           }
         phoneui.hideActivityDialog();
       }

    m1-galerie-ResultGalerie is a text fields
    when i test my page is loaded and displayed in my m1-galerie-ResultGalerie but wiht no effect.
    can you help me please?
    thanks
    Yann

    #323008

    Yann
    Member

    Hello ,
    i tested from google chrom and i ve this error message in js console:
    XMLHttpRequest cannot load file:///C:/Users/Yann/Desktop/index-www/gallery/lib/klass.min.js?_=1328545728722. Origin null is not allowed by Access-Control-Allow-Origin.

    ??????????????
    i don’t understand because this is a local file
    any idea?
    thanks , Yann

    #323009

    support-michael
    Keymaster

    @Yann

    A couple of thoughts:

    1) @support-vadim pointed out that Chrome by default does not allow to load files from file:// protocol
    http://www.google.com/support/forum/p/Chrome/thread?tid=171316324d16747b&hl=en

    2) Check and see if the MobiOne Local Server is enabled? If yes try disabling it and see if the problem clears
    From Window>Settings, got to Local Server and disable

    #323014

    Yann
    Member

    Thanks Wayne
    but i don’t found a solution.
    my remote page run as well with safari or chrome,
    i tried to call remote page from safari on my iphone.
    But when i call from MobiOne Test center nothing happen
    i change index_custom.js and add CSS & JS
    helpppppppp

    #323027

    Yann
    Member

    @Wayne

    is it possible to call a entir remote web page via ajax?
    because when i call my remote web page with js tag she’s run as well
    so, i put js in index_custom.js like that:

      $("head").append(
           $(" <link href='gallery/styles.css' type='text/css' rel='stylesheet'/>"));
    
    $("head").append(
           $("<script type='text/javascript' src='gallery/lib/klass.min.js'></script>"));
    
    $("head").append(
           $("<script type='text/javascript' src='gallery/lib/code.photoswipe-3.0.4.min.js'></script>"));
    
    $("head").append(
           $("<script type='text/javascript' src='gallery/lib/galerie.js'></script>"));
    
      callOtherDomain("http://xxxxxx.fr/xml/galerie/gallery.asp","m1-galerie-ResultGalerie");
    

    Css files are loaded but js file seems missing in ressource monitor
    Thanks for your help
    Yann

    #323050

    Yann
    Member

    @Wayne
    Hello, do you have an example of remote photo gallery ?
    my photos are hosted by a remote server and i would like to load them by ajax because this app will be compiled for appstore.
    in my remote page i’ve the list of photo hosted by remote server.
    thanks
    Yann

    #323056

    support-michael
    Keymaster

    hi yanni,

    No I have not developed an image gallery. I have been in discussion with the dev team about how to do this. Last week I started researching use of a carousel widget that we hope to add to the palette in the next couple of months. It can be used to hold a wide range of UI components.

    My approach to an image gallery would be to include the widget in my UI (bundled in my app) and fetch the images dynamcially. Furthermore if it is a large gallery I would consider fetching images incrementally. Think of how some of the news readers or facebook’s timeline incrementally fetch images as you reach the end of the list. Here is a brief video of the carousel widget that I hacked into one of my UI’s for demo purposes.
    http://www.genuitec.com/support-genuitec/viewtopic.php?p=5356#p5356
    The widget is swipeview from http://cubiq.org/. I only embedded text it in for demo purposes. But it can accept images.

    In this example I had to make a 1 line tweak to the css and add <div> to my html. I did not try resizing such as device orientation.

    #323061

    Yann
    Member

    Thanks Wayne,
    it’s very interesing for me, i hope you ll find a solution to integrate image gallery component in MobiOne.
    So, your video is “may be” a solution for me, do you have an example or mobi file about this demo (SwipeView)
    PS: my first app has been accepted by AppleStore :o)

    thanks a lot
    Yann

    #323062

    support-michael
    Keymaster

    @Yann

    >PS: my first app has been accepted by AppleStore :o)

    congrats. can you share a link?

    #323065

    Yann
    Member
    #325385

    bezoris
    Member

    Anyone ever resolve this? Even better would be a skeleton project…

    I’m also attempting to implement a photoswipe gallery (for ipad)… All is remote after a loading page image button. Everything is fine until a thumbnail tap, then safari launches to display the full image (a painting in this case).

    i realize that it’s Android launch day for you guys, but some direction would be great!

    Best, Chris.

    #325433

    Yann
    Member

    Hello,
    in my project i used this
    http://cubiq.org/swipeview
    Yann

    #325442

    bezoris
    Member

    Thanks Yann… Looks good I’ll check it out.

    Did you add swipeview as custom js, or leave it completely remote? Just curious.

    Thanks, Chris.

    #325444

    support-michael
    Keymaster

    @bezoris

    Here is ref to an example screencast of a UI I created a while back using swipeview with mobione:
    http://www.genuitec.com/support-genuitec/viewtopic.php?p=5356#p5356

    The integration of swipeview is a manual process. I did not try integrating images but should be doable, it’s just javascript.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Image Gallery

You must be logged in to post in the forum log in