Editmode and javascript slimbox

Jun 30, 2008 at 4:03 PM
Hey,
i have declared a n2 system with one dropable zone. Now i added in the head of my masterpage some javascripts 

When i called the page in n2-edit systen the drag & drop features are not working. I've tried to overwrite the preview url 

Public MustInherit Class N2AbstractPage
    Inherits ContentItem
    Implements INode

    Public ReadOnly Property PreviewUrl() As String
        Get
            Return Url & "?preview=true"
        End Get
    End Property
End Class

and in my masterpage ...

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Request("preview") = "" Then
            Page.Header.Controls.Add(New LiteralControl("<script src='/javascript/mootools-slimbox.js' type='text/javascript'></script>"))
            Page.Header.Controls.Add(New LiteralControl("<script src='/javascript/slimbox.js' type='text/javascript'></script>"))
        End If
    End Sub

but that doesen't work. I think the slimbox scripts overwrites the autoscroll-feature.

Any suggestions
BR Oliver

Coordinator
Jun 30, 2008 at 4:15 PM
Hi, try exchanging

        If Request("preview") = "" Then

with

If Request("edit") <> "drag" Then

I'll try to make the dragging and dropping more robust in combination with other scripting libraries