Browse Source

зачаток

tags/4.1
Михаил Капелько 2 years ago
commit
c9b8f758af
9 changed files with 146 additions and 0 deletions
  1. +17
    -0
      3.0/редактор/100.редактор.js
  2. +18
    -0
      3.0/редактор/200.пульт.js
  3. +12
    -0
      3.0/редактор/700.муром.js
  4. +17
    -0
      3.0/редактор/ace/ace.js
  5. +8
    -0
      3.0/редактор/ace/ext-searchbox.js
  6. +8
    -0
      3.0/редактор/ace/mode-javascript.js
  7. +1
    -0
      3.0/редактор/ace/worker-javascript.js
  8. +64
    -0
      3.0/редактор/index.html
  9. +1
    -0
      index.html

+ 17
- 0
3.0/редактор/100.редактор.js View File

@@ -0,0 +1,17 @@
function Редактор(имяОбласти)
{
this.создать = function()
{
this.установитьAce();
};

this.установитьAce = function()
{
var область = document.getElementById(имяОбласти);
this.ace = window.ace.edit(имяОбласти);
this.ace.session.setMode("ace/mode/javascript");
}

// Конструктор.
this.создать();
}

+ 18
- 0
3.0/редактор/200.пульт.js View File

@@ -0,0 +1,18 @@
function Пульт(имяОбласти, имяПуска)
{
this.создать = function()
{
this.настроитьКнопкуПуска();
};

this.настроитьКнопкуПуска = function()
{
var пуск = document.getElementById(имяПуска);
пуск.addEventListener("click", function(событие) {
/**/console.debug("НАДО запустить");
});
};

// Конструктор.
this.создать();
}

+ 12
- 0
3.0/редактор/700.муром.js View File

@@ -0,0 +1,12 @@
function Муром()
{
this.создать = function()
{
this.редактор = new Редактор("редактор");
this.пульт = new Пульт("пульт", "пуск");

};

// Конструктор.
this.создать();
}

+ 17
- 0
3.0/редактор/ace/ace.js
File diff suppressed because it is too large
View File


+ 8
- 0
3.0/редактор/ace/ext-searchbox.js
File diff suppressed because it is too large
View File


+ 8
- 0
3.0/редактор/ace/mode-javascript.js
File diff suppressed because it is too large
View File


+ 1
- 0
3.0/редактор/ace/worker-javascript.js
File diff suppressed because it is too large
View File


+ 64
- 0
3.0/редактор/index.html View File

@@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>M-3.0</title>
<style>
#редактор
{
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: calc(50% - 2em);
}
#пульт
{
position: absolute;
left: calc(50% - 2em);
top: 0;
bottom: 0;
width: 4em;
border: 1px solid lightgrey;
display: flex;
justify-content: center;
padding-top: 1em;
}
#воспроизведение
{
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: calc(50% - 2em);
}
</style>
<style>
.кнопка {
border-radius: 50%;
width: 3em;
height: 3em;
border: 1px solid lightgrey;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div id="редактор"></div>
<div id="пульт">
<a class="кнопка" id="пуск">&#9658;</a>
</div>
<div id="воспроизведение"></div>
<script src="ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="ace/mode-javascript.js" type="text/javascript" charset="utf-8"></script>
<script src="ace/worker-javascript.js" type="text/javascript" charset="utf-8"></script>
<script src="100.редактор.js"></script>
<script src="200.пульт.js"></script>
<script src="700.муром.js"></script>
<script>
var муром = new Муром();
</script>
</body>
</html>

+ 1
- 0
index.html View File

@@ -0,0 +1 @@
3.0/редактор/index.html

Loading…
Cancel
Save