[vlc-commits] Qt: web intf: Ease mobile intf url access with QR-Code

Francois Cartegnie git at videolan.org
Sun Nov 27 21:34:46 CET 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Nov 27 21:32:32 2011 +0100| [2567c03f4c36be2d4b99a2744ded28890fd94618] | committer: Francois Cartegnie

Qt: web intf: Ease mobile intf url access with QR-Code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2567c03f4c36be2d4b99a2744ded28890fd94618
---

 share/lua/http/index.html |    2 +-
 share/lua/http/js/ui.js   |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/share/lua/http/index.html b/share/lua/http/index.html
index 3f79537..2d84163 100644
--- a/share/lua/http/index.html
+++ b/share/lua/http/index.html
@@ -255,7 +255,7 @@
 			</div>
 			
 			<div class="footer">
-				VLC <?vlc print(vlc.misc.version() .. " - Lua Web Interface - " .. vlc.misc.copyright()) ?>
+				VLC <?vlc print(vlc.misc.version() .. ' - Lua Web Interface - <a id="mobileintflink" href="/mobile.html">Mobile Interface</a> - ' .. vlc.misc.copyright()) ?>
 			</div>
 		</div>
 		</div>
diff --git a/share/lua/http/js/ui.js b/share/lua/http/js/ui.js
index 50a0df4..7fe3207 100644
--- a/share/lua/http/js/ui.js
+++ b/share/lua/http/js/ui.js
@@ -81,4 +81,11 @@ $(function () {
         return false;
     });
     $('#stream_host').val(stream_server);
+    $('#mobileintflink').click(function () {
+        var urlimg = location.href + '/mobile.html';
+        var codeimg = $('<img width="350" height="350" alt="qrcode"/>');
+        codeimg.attr('src', 'http://chart.apis.google.com/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl=' + encodeURIComponent(urlimg));
+        codeimg.dialog({width: 350, height: 350, title: 'QR-Code'});
+        return false;
+    });
 })



More information about the vlc-commits mailing list