Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var selectedtool;
- //Toolstates
- var selectionTool, textTool, linkTool, divTool, tableTool, formTool = false;
- $(function()
- {
- });
- function selectTool(tool)
- {
- $(tool).switchClass('toolboxtool', 'toolboxtoolselected', 150);
- if(tool != selectedtool)
- {
- $(selectedtool).switchClass('toolboxtoolselected', 'toolboxtool', 1);
- }
- if(tool == "#selectiontool")
- {
- document.getElementById("infobox").innerHTML =
- "<div class='infoboxtitle' id='infoboxtitle'>Info</div><div class='infoboxgrip' id='infoboxgrip' title='Drag Me'>≡≡≡</div><div class='elementtitle' id='elementtitle'>Selection Tool</div>";
- document.body.style.cursor = "copy";
- }
- if(tool == "#texttool"){document.body.style.cursor = "text";}
- if(tool == "#linktool"){document.body.style.cursor = "text";}
- if(tool == "#divtool"){document.body.style.cursor = "cell";}
- if(tool == "#tabletool"){document.body.style.cursor = "default";}
- if(tool == "#formtool"){document.body.style.cursor = "default";}
- if(tool == "#sitesettings")
- {
- document.getElementById("infobox").innerHTML =
- "<div class='infoboxtitle' id='infoboxtitle'>Info</div><div class='infoboxgrip' id='infoboxgrip' title='Drag Me'>≡≡≡</div><div class='elementtitle' id='elementtitle'>Background</div><div class='elementoption' id='elementoption'><input type='checkbox'id='backgroundcolorcheck'checked='checked'onclick='applyOptions()'></input> Background Color: #<input type='text'class='textfield'id='backgroundcolor'maxlength='6'oninput='applyOptions()'></input><br /><div class='elementexample'id='elementexample'onclick='$(" + '"#backgroundcolor"' + ").val(" + '"000000"' + ");applyOptions()'>Black</div><div class='elementexample'id='elementexample'onclick='$(" + '"#backgroundcolor"' + ").val(" + '"CC0000"' + ");applyOptions()'>Red</div><div class='elementexample'id='elementexample'onclick='$(" + '"#backgroundcolor"' + ").val(" + '"00CC00"' + ");applyOptions()'>Green</div><div class='elementexample'id='elementexample'onclick='$(" + '"#backgroundcolor"' + ").val(" + '"0000CC"' + ");applyOptions()'>Blue</div><br /></div><div class='elementoption' id='elementoption'><input type='checkbox'id='backgroundimagecheck'checked='checked'onclick='applyOptions()'></input> Background Image: <input type='text'class='textfield'id='backgroundimage'placeholder='http://www.example.com'onchange='applyOptions()'></input><br /><div class='elementexample'id='elementexample'onclick='$(" + '"#backgroundimage"' + ").val(" + '"http://farm6.staticflickr.com/5093/5450854606_4ece968890_z.jpg"' + ");applyOptions()'>Example Background</div>Repeat: <input type='radio'name='backgroundimageradio'id='backgroundimageradiono'onclick='applyOptions()'>No </input><input type='radio'name='backgroundimageradio'id='backgroundimageradiox'onclick='applyOptions()'>X </input><input type='radio'name='backgroundimageradio'id='backgroundimageradioy'onclick='applyOptions()'>Y </input><input type='radio'name='backgroundimageradio'id='backgroundimageradioboth'checked='checked'onclick='applyOptions()'>Both </input></div><br />";
- document.body.style.cursor = "default";
- }
- selectedtool = tool;
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment