<commit_before>{literal}
<script type="text/javascript" src="lib/mootools/mootools.js"></script>
<script type="text/javascript" src="lib/mootools/extensions/windoo/windoo.js"></script>
{/literal}

<div style='width: {$mypage_width}; height: {$mypage_height};'>
<div id='mypage' style='position: absolute; width: {$mypage_width}; height: {$mypage_height};'>
 <div id='mypage_tools'>
  <a href='#'>New IFrame</a>
 </div>

 <div>
  <p>IFrame:</p>
  Title: <input id='mypage_newiframe_title' type='text' value='' /><br />
  URL:   <input id='mypage_newiframe_url' type='text' value='' /><br />
  <input id='mypage_newiframe_submit' type='button' value='Create'>
 </div>

 <div>
  <p>wiki:</p>
  Title: <input id='mypage_newwiki_pagename' type='text' value='' /><br />
  <input id='mypage_newwiki_submit' type='button' value='Create'>
 </div>
</div>
</div>

{literal}
<script type="text/javascript">

// open saved windows
tikimypagewin=[];
{/literal}{$mypagejswindows}{literal}


$('mypage_newiframe_submit').addEvent('click', function() {
	var title=$('mypage_newiframe_title').value;
	var url=$('mypage_newiframe_url').value;

	xajax_mypage_win_create({/literal}{$id_mypage}{literal}, 'iframe', title, url);
});

$('mypage_newwiki_submit').addEvent('click', function() {
	var pagename=$('mypage_newwiki_pagename').value;

	xajax_mypage_win_create({/literal}{$id_mypage}{literal}, 'wiki', pagename, pagename);
});


</script>
{/literal}
<commit_msg>[DEV] mypage: added sidebar for tools<commit_after>{literal}
<script type="text/javascript" src="lib/mootools/mootools.js"></script>
<script type="text/javascript" src="lib/mootools/extensions/windoo/windoo.js"></script>
{/literal}

<div style='width: {$mypage_width}; height: {$mypage_height};'>
<div id='mypage' style='position: absolute; width: {$mypage_width}; height: {$mypage_height}; overflow: hidden;'>

 <!-- sidebar -->
 <div id='sideBar' style='position: absolute; width: auto; height: auto; top: 200px; right: 7px; z-index: 255;'>

  <a href="#" id="sideBarTab" style='float:left; height:137px; width:28px; border: 0;'>
   <img src="img/cord.png" alt="sideBar" title="sideBar" style='width: 28px; height: 137px; border: 0;'/>
  </a>
	
  <div id="sideBarContents" style="width:0px; overflow: hidden !important; background: white;">
   <div id="sideBarContentsInner" style="width: 200px;">
    <h2>side<span>bar</span></h2>

    <ul>

     <li>
      <p>IFrame:</p>
      Title: <input id='mypage_newiframe_title' type='text' value='' /><br />
      URL:   <input id='mypage_newiframe_url' type='text' value='' /><br />
      <input id='mypage_newiframe_submit' type='button' value='Create'>
     </li>

     <li>
      <p>wiki:</p>
      Title: <input id='mypage_newwiki_pagename' type='text' value='' /><br />
      <input id='mypage_newwiki_submit' type='button' value='Create'>
     </li>

    </ul>

   </div>
  </div>
 </div> <!-- sidebar -->


 <div style='padding-top: 200px;'>
 </div>

 <div style='padding-top: 300px;'>
 </div>
</div>
</div>

{literal}
<script type="text/javascript">

// open saved windows
tikimypagewin=[];
{/literal}{$mypagejswindows}{literal}


//////////////////////
//
// initialize buttons
//

$('mypage_newiframe_submit').addEvent('click', function() {
	var title=$('mypage_newiframe_title').value;
	var url=$('mypage_newiframe_url').value;

	xajax_mypage_win_create({/literal}{$id_mypage}{literal}, 'iframe', title, url);
});

$('mypage_newwiki_submit').addEvent('click', function() {
	var pagename=$('mypage_newwiki_pagename').value;

	xajax_mypage_win_create({/literal}{$id_mypage}{literal}, 'wiki', pagename, pagename);
});


////////////
//
// slidebar
//
// this code come from http://www.andrewsellick.com/examples/sliding-side-bar/
//

var isExtended = 0;
var height = 450;
var width = 200;
var slideDuration = 1000;
var opacityDuration = 1500;

function extendContract(){
	
	if(isExtended == 0){
		
		sideBarSlide(0, height, 0, width);
		
		sideBarOpacity(0, 1);
	
		isExtended = 1;
		
		// make expand tab arrow image face left (inwards)
		$('sideBarTab').childNodes[0].src = $('sideBarTab').childNodes[0].src.replace(/(\.[^.]+)$/, '-active$1');
		
	}
	else{
		
		sideBarSlide(height, 0, width, 0);
		
		sideBarOpacity(1, 0);
		
		isExtended = 0;
		
		// make expand tab arrow image face right (outwards)
		
		$('sideBarTab').childNodes[0].src = $('sideBarTab').childNodes[0].src.replace(/-active(\.[^.]+)$/, '$1');
	}

}

function sideBarSlide(fromHeight, toHeight, fromWidth, toWidth){
		var myEffects = new Fx.Styles('sideBarContents', {duration: slideDuration, transition: Fx.Transitions.linear});
		myEffects.custom({
			 'height': [fromHeight, toHeight],
			 'width': [fromWidth, toWidth]
		});
}

function sideBarOpacity(from, to){
		var myEffects = new Fx.Styles('sideBarContents', {duration: opacityDuration, transition: Fx.Transitions.linear});
		myEffects.custom({
			 'opacity': [from, to]
		});
}

function init(){
	$('sideBarTab').addEvent('click', function(){extendContract()});
}

window.addEvent('load', function(){init()});

///////////////////////////


</script>
{/literal}

{'fraction_non_alphanumeric': 0.21216879293424926, 'fraction_numerical': 0.012365063788027477, 'mean_word_length': 4.77123442808607, 'pattern_counts': {'":': 0, '<': 80, '<?xml version=': 0, '>': 80, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4868055', 'n_tokens_mistral': 1975, 'n_tokens_neox': 1779, 'n_words': 347}