Scala | Lift | How to make across menu - scala

Using
<div class="lift:Menu.builder"/>
menu on website is vertically, any ideas because i cant found anywhere, how to make menu across ?

This is more a CSS question than a Lift question. The HTML produced for the menu looks something like this:
<div class="column span-6 colborder sidebar">
<hr class="space" />
<ul>
<li> <span>Home</span></li>
<li> Login</li>
<li> Sign Up</li>
<li> Lost Password</li>
<li> Search</li>
</ul>
...
</div>
I.e., about as vanilla as possible, so it's very easy to add some CSS to create a horizontal menu out of the list—see for example the "Horizontal lists" examples on Listamatic.
It would be simplest just to add the CSS code to the header in src/main/webapp/templates-hidden/default.html, but you could also use your own separate CSS file without too much fuss.

Related

bxslider change 2 sliders at one click

I am using Bxslider on a tabbed gallery with thumbnails
and it works great. the arrows and the tabs are working perfectly.
this is the JS I am using:
jQuery('#learni-features .bxslider').bxSlider({
mode: 'fade',
useCSS: false,
moveSlides: 1,
pagerCustom: '.tabs-links'
});
and this is the HTML:
this is for the tabs:
<ul class="tabs-links">
<li class="active">Curriculum <br>Control</li>
<li>Interactive <br>Classes</li>
<li>Social <br>Layer</li>
<li>Parent<br> App</li>
<li>Teacher <br>Community</li>
</ul>
and this is for the gallery:
<ul class="bxslider clearfix">
<li>
<img src="uploads/curriculum-screen.png" alt="">
</li>
<li>
<img src="uploads/interactive-screen.png" alt="">
</li>
<li>
<img src="uploads/social-screen.png" alt="">
</li>
<li>
<img src="uploads/parent-screen.png" alt="">
</li>
<li>
<img src="uploads/teacher-community-screen.png" alt="">
</li>
</ul>
I have another floating div with text:
<div class="info">
<ul class="slider2">
<li>
<h3>All Your Learning Tools in One Place</h3>
<p>Access course books, Learnies, assignments and learning assets from one place. Review your past lesson plans and easily answer your students’ questions. Create and begin your new class sessions!</p>
</li>
<li>
<h3>Access course books, Learnies</h3>
<p>Access course books, Learnies, assignments and learning assets from one place. Review your past lesson plans and easily answer your students’ questions. Create and begin your new class sessions!</p>
</li>
<li>
<h3>Create and begin your new class sessions</h3>
<p>Access course books, Learnies, assignments and learning assets from one place. Review your past lesson plans and easily answer your students’ questions. Create and begin your new class sessions!</p>
</li>
</ul>
</div>
this text needs to be also dynamic so when I click either on the tabs or the arrows it will change the text in that box too which basically belongs to each slide (information box). the thing is that this box is outside the "loop" of the slider.
is there a way I can trigger 2 sliders? the main gallery with the images and at the same time the text in the box.
Here is a fiddle I created
Notice the slider is working but there is another div at the bottom with a class of "info" and I want that div to be controlled from the the same main slider and change the text there..
THe button "Schedule a Demo" by the way is a stand alone button and stays there fixed.
any help will be appreciated
Thanks!
Assign your bxSlider to a variable:
var slider = $('#learni-features .bxslider').bxSlider({
mode: 'fade',
useCSS: false,
moveSlides: 1,
pagerCustom: '.tabs-links'
});
Then you can use onSlideNext and onSlidePrev as:
slider.onSlideNext(new function($slideElement, $oldIndex, $newIndex) {
//Your code here.
});
You can find out more information in the bxSlider documents founder here.

GWT adding dynamic menu item to a custom built menu

I have built a menu using the regular html in GWT as show below.
<g:HTMLPanel>
<div id="navigation">
<div id="menuLeft" class="menu">
<ul>
<li>
<g:Anchor ui:field="homeLink" styleName="active"><i class="fa fa-home"></i> Home</g:Anchor>
</li>
<li class="active">
<i class="fa fa-suitcase"></i> Businesses
<ul ui:field="businessesMenu">
<li>
<g:Anchor ui:field="enrollBusiness">Enroll Business </g:Anchor>
</li>
</ul>
</li>
</ul>
.....
as it is rendering the very nicely using css provided. All is well till this point, now comes the requirement; to this I have to add dynamic menu item based on some business logic, which means I have to add more s to the existing menu .
I'm able to build/add dynamic item but not able to add an event handler.
Any help appreciated.
IF you are using Dom to add the dynamic menu, you can refer this for adding click handlers.
you can refer this to add handlers.

TinyMCE repositioning <span> tags

i've seen some TinyMCE editor questions here before, so figured it was kosher.
Using Version 3.1.2
I have a "glossary" I am trying to use and on save, the code is getting repositioned so that portions of the glossary that need to be hidden are not.
It is taking a <UL> and placing it outside of a <span> tag I have.
The following code:
<p class="hide_def">
<span class="term_title">Investigational</span><br>
<span class="def">Definition Here
<ul>
<li>Definition Bullet Point</li>
</ul>
</span>
</p>
Is being changed to the snippet below. This throws all of the <UL> tags outside of the definition area.:
<p class="hide_def">
<span class="term_title">Investigational</span><br>
<span class="def">Definition Here</span></p>
<ul>
<li>Bullet Point</li>
</ul>
I have heard of turning off the "cleaning" config setting in TinyMCE, but also heard that is a bad idea.
What can I do here?
Since tinymce version 3.4 deactivation of the cleanup functionality is not apossible anymore.
With your version you can set the tinymce config param cleanup to false:
cleanup: false,

expression-engine : Fancybox + EE?

I am having a problem using fancybox with expression engine.
Basically I have different galleries set-up using matrix plugin. Each gallery has around 10 images. Basically I want the thumbnail to open up fancybox and fancybox to be able to scroll through the images in that matrix entry/gallery.
Sounds simple but I can’t seem to get fancybox to scroll through the images, it just stays on the first image.
This is my code for the thumbnails:
<ul id="image_gallery">
{exp:channel:entries channel="gallery_images"}
<li>
<a class="grouped_elements" href="{title_permalink='gallery/view'}" rel="{title}">
{gallery_image limit="1"}
{exp:imgsizer:size src="{image}" width="200px" height="180px"}
<img src="{sized}" width="{width}" height="{height}" alt="" />
{/exp:imgsizer:size}
{/gallery_image}
</a>
<h1>{title}</h1>
</li>
{/exp:channel:entries}
</ul>
This is my code for the fancybox template:
{exp:channel:entries channel="gallery_images"}
<ul id="img_gallery">
{gallery_image}
<li>
{exp:imgsizer:size src="{image}" width="650px" height="500px"}
<img src="{sized}" width="{width}" height="{height}" alt=""/>
{/exp:imgsizer:size}
</li>
{/gallery_image}
</ul>{/exp:channel:entries}
Everything works fine except for the image scrolling.
I’d appreciate any help!
Without seeing the output of your ExpressionEngine tags, it's difficult to understand where the problem is. However, your problem may be as simple as making sure all of the images in a gallery share the same HTML relationship attribute.
Fancybox Galleries are created from elements who share the same rel="" attribute:
<a class="gallery" rel="set_1" href="#"><img src="1.jpg" alt=""/></a>
<a class="gallery" rel="set_1" href="#"><img src="2.jpg" alt=""/></a>
<a class="gallery" rel="set_1" href="#"><img src="3.jpg" alt=""/></a>
<script>
$('a.gallery').fancybox();
</script>
In looking over your code, you're using the ExpressionEngine {title} tag as the rel="" attribute.
Since the title of your channel entry likely contains spaces and other special characters, a better choice would be to use the URL Title field, {title_permalink}.
The {title_permalink} tag converts the channel entry title to be URL-safe using either hyphens or underscores as character separators (using the Word Separator for URL Titles setting in the Global Channel Preferences).
Your updated thumbnail code would then be:
<a class="grouped_elements" href="{title_permalink='gallery/view'}" rel="{title_permalink}">
<img src="{sized}" width="{width}" height="{height}" alt="" />
</a>
If this doesn't work, perhaps you can provide a more complete code sample such as a jsFiddle or Pastie to help us understand where the problem may be.

jQtouch toggal checkbox change default position to On

I am using jQtouch for my iPhone application,
I need to check box filed, in jQtouch we have the code below like this.
<ul>
<li>
Toggle The <span class="toggle"><input type="checkbox"/></span>
</li>
</ul>
By using this code we can display the
On-Off image, in the it will be by default off position.
But I need the 'On' position by default.
can you some one help me out for this.
The simplest solution is to add "checked" to the <input> tag:
Toggle The <span class="toggle"><input type="checkbox" checked/></span>
IF you want to handle programmaticaly:
$('toggle input[type="checkbox"]').attr('checked', true)
If you put that in your .Ready() (or page loaded function) the checkbox will be checked by default.
I would recommend that you give the Checkbox an id so that you can specify exactly which you want to change:
<ul>
<li>
Toggle The <span class="toggle"><input id="myCheckbox" type="checkbox"/></span>
</li>
</ul>
Then use:
$('#myCheckbox').attr('checked', true)