Explorar o código

Parse "#" in aside ids

soyjavi %!s(int64=13) %!d(string=hai) anos
pai
achega
5fac471a68
Modificáronse 2 ficheiros con 16 adicións e 2 borrados
  1. 15 1
      examples/kitchen-sink/index.html
  2. 1 1
      src/view/Lungo.View.Aside.js

+ 15 - 1
examples/kitchen-sink/index.html

@@ -48,6 +48,20 @@
 </head>
 
 <body class="app">
+    <section id="a">
+        <header data-title="a"></header>
+        <article>
+            <a href="#b" data-router="section" class="button red big" data-label="kakaka"></a>
+        </article>
+    </section>
+
+    <section id="b">
+        <header data-title="b" data-back="home"></header>
+        <article id="b_1">b_1</article>
+        <article id="b_2">b_2</article>
+
+    </section>
+
     <section id="main" data-transition="slide">
         <header  class="">
             <nav class="left button">
@@ -145,7 +159,7 @@
         });
 
         Lungo.ready(function() {
-            Lungo.View.Aside.show('#features');
+            Lungo.View.Aside.show('features');
         });
     </script>
     <script src="app/app.js"></script>

+ 1 - 1
src/view/Lungo.View.Aside.js

@@ -41,7 +41,7 @@ Lungo.View.Aside = (function(lng, undefined) {
      * @param  {string} Aside id
      */
     var show = function(aside) {
-        if (lng.Core.toType(aside) == 'string') aside = _findAside(aside);
+        if (lng.Core.toType(aside) == 'string') aside = _findAside(lng.Core.parseUrl(aside));
         if (aside) {
             lng.Element.Current.aside = aside;
             var aside_stylesheet = _asideStylesheet(aside);