62 lines
2.9 KiB
HTML
62 lines
2.9 KiB
HTML
<html>
|
|
<head>
|
|
<title>cmsPro</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="author" content="www.project-pro.pl - internetowe rozwiązania dla biznesu">
|
|
</head>
|
|
<body>
|
|
<textarea id="ckContent"></textarea>
|
|
<div id="buttons_container">
|
|
<input type="button" value="Zapisz zmiany" id="saveChanges" onClick="save()" />
|
|
<input type="button" value="Anuluj" id="cancel" onClick="window.close()" />
|
|
</div>
|
|
|
|
|
|
<style type="text/css">
|
|
* {margin:0; padding:0;}
|
|
input {outline:none; padding:6px 9px; margin:2px; cursor:pointer; font-family:Arial, Helvetica, sans-serif; -webkit-border-radius:3px; border-radius:3px; -webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.15); box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.15); background-color:#e0e0e0; color:#666; text-shadow:none; border:1px solid #ababab;}
|
|
#saveChanges {background-color:#63a730; color:#fff; border:1px solid #62a62f; background-image:-webkit-linear-gradient(#7ebe4c,#63a730); background-image:linear-gradient(#7ebe4c,#63a730);}
|
|
#cancel {background-image:-webkit-linear-gradient(#e8e5e5,#e0e0e0); background-image:linear-gradient(#e8e5e5,#e0e0e0);}
|
|
input:active {-webkit-box-shadow:inset 0 0 6px rgba(0, 0, 0, 0.2); box-shadow:inset 0 0 6px rgba(0, 0, 0, 0.2)}
|
|
#buttons_container {position:fixed; width:100%; height:35px; bottom:.5em; right:.5em; text-align:right; z-index:9999;}
|
|
</style>
|
|
|
|
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
|
<script type="text/javascript">
|
|
// configure your editor here and pass it to "editor" variable
|
|
var editor = CKEDITOR.replace('ckContent', {
|
|
on : {
|
|
'instanceReady': function(evt){
|
|
evt.editor.execCommand('maximize');
|
|
document.getElementById('buttons_container')
|
|
}
|
|
},
|
|
toolbar : 'MyTool',
|
|
contentsCss : 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
|
|
contentsCss : '/libraries/framework/fonts/font-awesome/font-awesome.css'
|
|
});
|
|
|
|
// do not alter codes below
|
|
var param = Array();
|
|
param = queryString();
|
|
document.getElementById('ckContent').innerHTML = window.opener.CKEDITOR.dialog.getCurrent()._.element.$.getElementsByClassName(param['edit'])[param['content']].value;
|
|
|
|
function save(){
|
|
window.opener.CKEDITOR.dialog.getCurrent()._.element.$.getElementsByClassName(param['edit'])[param['content']].value = editor.getData();
|
|
window.close();
|
|
};
|
|
|
|
function queryString(){
|
|
var qs = (location.search).replace('?', '').split('&');
|
|
var par = Array();
|
|
for(var i in qs){
|
|
var tmp = qs[i].split('=');
|
|
par[tmp[0]] = tmp[1];
|
|
}
|
|
return par;
|
|
};
|
|
</script>
|
|
</body>
|
|
</html> |