File Manager javascript error

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/2/2010 8:51:27 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

Here is the code! i put the code on the bottom of the css paths between the <head> tags.

 

<!--script type="text/javascript" src="<%= SkinPath %>js/jquery-1.4.2.min.js"></script-->
<script type="text/javascript" src="<%= SkinPath %>js/jquery.jcarousellite.js"></script>
<script type="text/javascript" src="<%= SkinPath %>js/jquery.easing.1.1.js"></script>
<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function() {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed:200,
easing: "easein",
visible: 1,
afterEnd: function(a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if(jQuery.browser.webkit || jQuery.browser.msie){
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index){
//alert ($('.slideshow .button-holder ul li').size());
index = ((index-1) % $('.slideshow .button-holder span').size()+1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-'+index).addClass('on');
}

</script>
 

12/2/2010 9:24:25 AM
Gravatar
Total Posts 2192

Re: File Manager javascript error

Hi,

Put your javascript after the <asp:ScriptManager control.

HTH,
Joe D.

12/2/2010 9:30:28 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

Thank you,

 

and where do i put the <asp:ScriptManager control.?

12/2/2010 9:32:55 AM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

Ok first of all, put your code in the bottom of the layout.master page, if you see the code of the page the scriptmanager is inside the form so if you put the script in the header the scriptmanager don't find the code. Secondly Jquery is already port of mojoportal so you don't need to add a reference to it. If you want to add the jcarousellite put this in the ClientScript folder under your data/sites/1/ClientScript/

 

I don't now if you new about it but, there is a  slideshow function in the html module, give a try, and may be you can achieve what you look with out adding the script.

12/2/2010 9:42:52 AM
Gravatar
Total Posts 18439

Re: File Manager javascript error

Hi All,

There is often confusion about adding javascript and especially jquery plugins. I talked about this a good deal in our last user group meeting and you could watch the video of that meeting for more detail.

I just created this document to make it easier to find out what you need to know.

http://www.mojoportal.com/adding-custom-javascript.aspx

Hope it helps,

Joe

12/2/2010 9:47:08 AM
Gravatar
Total Posts 36

Re: File Manager javascript error

germandb!

 

Regarding the slideshow function module, where can i find it? Sorry for all the questions im new to mojoPortal 

12/2/2010 9:52:00 AM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

You can see the documentation hear http://www.mojoportal.com/htmlmodule.aspx

but basically insert a html module and in the settings click Enable Slideshow of Elements. The you create a div structure with the image inside

12/6/2010 12:59:14 PM
Gravatar
Total Posts 36

Re: File Manager javascript error

NO LUCK! Here is part of my code, and where i have put the crousel script in the bottom for the code.

 

<script type="text/javascript">
$(document).ready(function () {
$("span.downarr a").click(function () {
$("#toolbar").fadeOut();
$("#toolbarbut").fadeIn("slow");
});
$("span.showbar a").click(function () {
$("#toolbar").fadeIn();
$("#toolbarbut").fadeOut("slow");
});
$("span.downarr a, span.showbar a").click(function () {
return false;
});
});
</script>
<portal:AutoHidePanel ID="ah1" runat="server">
<div id="toolbarbut">
<span class="showbar"><a href="#">show bar</a></span>
</div>
<div id="toolbar">
<div class="toolbarleft">
&nbsp;
</div>
<div class="toolbarright">
<span class="downarr"><a href="#"></a></span>
<portal:AdminMenuLink ID="lnkAdminMenu" runat="server" />
<portal:FileManagerLink ID="lnkFileManager" runat="server" />
<portal:NewPageLink ID="lnkNewPage" runat="server" />
<portal:PageEditFeaturesLink ID="lnkPageContent" runat="server" />
<portal:PageEditSettingsLink ID="lnkPageSettings" runat="server" />
<asp:ContentPlaceHolder ID="pageEditContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</portal:AutoHidePanel>
<portal:mojoGoogleAnalyticsScript ID="mojoGoogleAnalyticsScript1" runat="server" />
<portal:Woopra ID="woopra11" runat="server" />
<asp:ScriptManager>
<script type="text/javascript">

var current_carousel_position = 1;

$(document).ready(function () {

/* initialize carousel */
$('.mycarousel').jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
speed: 200,
easing: "easein",
visible: 1,
afterEnd: function (a) {
show_carousel_selected(current_carousel_position);
}
});

show_carousel_selected(current_carousel_position);

if (jQuery.browser.webkit || jQuery.browser.msie) {
$("#mycarousel").css('marginTop', '-16px');
}

/*if(jQuery.browser.webkit){
$("#mycarousel").css('marginTop', '-16px');
}*/


});

/* ***************************************************************************************** */
function show_carousel_selected(index) {
//alert ($('.slideshow .button-holder ul li').size());
index = ((index - 1) % $('.slideshow .button-holder span').size() + 1);
$('.slideshow .button-holder span').removeClass('on');
$('.slideshow .button-holder span#showcase-bullet-' + index).addClass('on');
}

</script>
</asp:ScriptManager>

</form>
</body>
</html>

12/6/2010 2:25:47 PM
Gravatar
Total Posts 108
Community Expert

Re: File Manager javascript error

First Remove the <asp:ScriptManager> tags. You alredy have a definition rigth after the form definition.

Second your sintaxis of the scrip manager control is wrong, you can read about it here

http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.aspx.

 

You must sign in to post in the forums. This thread is closed to new posts.