Spade
Mini Shell
PK�D�[�#o,,
index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�D�[秃���submitbutton.jsnu�[���/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage submitbutton.js
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
Joomla.submitbutton = function(task)
{
if (task == ''){
return false;
} else {
var action = task.split('.');
if (action[1] == 'cancel' || action[1] == 'close' ||
document.formvalidator.isValid(document.getElementById("adminForm"))){
Joomla.submitform(task, document.getElementById("adminForm"));
return true;
} else {
alert(Joomla.JText._('comment, some values are not
acceptable.','Some values are unacceptable'));
return false;
}
}
}PK�D�[��u55tmpl/default.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage default.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<?php echo $this->toolbar->render(); ?>
<!--[JCBGUI.site_view.default.32.$$$$]-->
<section id="comment">
<div class="row">
<div class="col-md-4">
<div class="card text-center">
<div class="card-header">
<img style="width: 62px; height: 62px;
border-radius: 50%" src="<?php echo $this->item->image;
?>" alt="<?php echo $this->item->alt;
?>">
</div>
<div class="card-body">
<p class="card-text">لطفا نظر
خود را درباره دکتر</p>
<h5 class="card-title"><?php echo
$this->item->users_name; ?></h5>
<p
class="card-text">بنویسید</p>
</div>
</div>
</div>
<div class="col-md-8">
<form action="" method="post"
id="adminForm">
<div class="form-group">
<?=
$this->form->getLabel('text');?>
<?=
$this->form->getInput('text');?>
</div>
<div class="form-group">
<?=
$this->form->getLabel('rate');?>
<?=
$this->form->getInput('rate');?>
</div>
<input class="btn btn-primary"
type="submit" value="ثبت" >
<?= JHtml::_('form.token');?>
<input type="hidden" name="task"
value="comment.save">
</form>
</div>
</div>
<div class="modal fade" id="cmModal"
tabindex="-1" role="dialog"
aria-labelledby="exampleModalCenterTitle"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered"
role="document">
<div class="modal-content">
<div class="modal-header
justify-content-center">
<svg xmlns="http://www.w3.org/2000/svg"
width="16" height="16" fill="currentColor"
class="bi bi-check2-circle" viewBox="0 0 16 16"
style="transform: scale(2.5); color:
#35e135" >
<path d="M2.5 8a5.5 5.5 0 0 1
8.25-4.764.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0 5.5 5.5 0
1 1-11 0z"/>
<path d="M15.354 3.354a.5.5 0 0
0-.708-.708L8 9.293 5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708
0l7-7z"/>
</svg>
</div>
<div class="modal-body">
نظر شما با موفقیت ثبت شد
</div>
<div class="modal-footer">
<a href="<?=
JRoute::_(JUri::root(),false);?>" class="btn
btn-primary">ادامه</a>
</div>
</div>
</div>
</div>
</section><!--[/JCBGUI$$$$]-->
PK�D�[�Y���tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8" ?>
<metadata>
<layout title="COM_RESERVATION_MENU_COMMENT_TITLE"
option="COM_RESERVATION_MENU_COMMENT_OPTION">
<message>
<![CDATA[COM_RESERVATION_MENU_COMMENT_DESC]]>
</message>
</layout>
</metadata>PK�D�[�#o,,tmpl/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�D�[*I��VV
view.html.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage view.html.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later -
http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____
_____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \(
_ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/
)(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__)
(_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Reservation View class for the Comment
*/
class ReservationViewComment extends JViewLegacy
{
// Overwriting JView display method
function display($tpl = null)
{
// get combined params of both component and menu
$this->app = JFactory::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
// get the user object
$this->user = JFactory::getUser();
// Initialise variables.
$this->item = $this->get('Item');
/***[JCBGUI.site_view.php_jview_display.32.$$$$]***/
$this->form= \Joomla\CMS\Form\Form::getInstance("comment",
JPATH_COMPONENT_ADMINISTRATOR . "/models/forms/comment.xml",
array("control" => "jform"));
$this->form->bind($this->app->getUserState('comment.data'));
/***[/JCBGUI$$$$]***/
// Set the toolbar
$this->addToolBar();
// set the document
$this->_prepareDocument();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode(PHP_EOL, $errors), 500);
}
parent::display($tpl);
}
/**
* Prepares the document
*/
protected function _prepareDocument()
{
// always make sure jquery is loaded.
JHtml::_('jquery.framework');
// Load the header checker class.
require_once( JPATH_COMPONENT_SITE.'/helpers/headercheck.php'
);
// Initialize the header checker.
$HeaderCheck = new reservationHeaderCheck;
// Add View JavaScript File
$this->document->addScript(JURI::root(true) .
"/components/com_reservation/assets/js/comment.js",
(ReservationHelper::jVersion()->isCompatible("3.8.0")) ?
array("version" => "auto") :
"text/javascript");
/***[JCBGUI.site_view.php_document.32.$$$$]***/
$status= $this->app->getUserState('status',0);
$this->document->addScriptOptions('status',$status);/***[/JCBGUI$$$$]***/
// add the document default css file
$this->document->addStyleSheet(JURI::root(true)
.'/components/com_reservation/assets/css/comment.css',
(ReservationHelper::jVersion()->isCompatible('3.8.0')) ?
array('version' => 'auto') : 'text/css');
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
// set help url for this view if found
$help_url = ReservationHelper::getHelpUrl('comment');
if (ReservationHelper::checkString($help_url))
{
JToolbarHelper::help('COM_RESERVATION_HELP_MANAGER', false,
$help_url);
}
// now initiate the toolbar
$this->toolbar = JToolbar::getInstance();
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var, $sorten = false, $length = 40)
{
// use the helper htmlEscape method instead.
return ReservationHelper::htmlEscape($var, $this->_charset, $sorten,
$length);
}
}
PK�c�[[��6"#"#
comment.jsnu�[���// CodeMirror, copyright (c) by Marijn
Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module ==
"object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) //
AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
var noOptions = {};
var nonWS = /[^\s\u00a0]/;
var Pos = CodeMirror.Pos;
function firstNonWS(str) {
var found = str.search(nonWS);
return found == -1 ? 0 : found;
}
CodeMirror.commands.toggleComment = function(cm) {
cm.toggleComment();
};
CodeMirror.defineExtension("toggleComment", function(options) {
if (!options) options = noOptions;
var cm = this;
var minLine = Infinity, ranges = this.listSelections(), mode = null;
for (var i = ranges.length - 1; i >= 0; i--) {
var from = ranges[i].from(), to = ranges[i].to();
if (from.line >= minLine) continue;
if (to.line >= minLine) to = Pos(minLine, 0);
minLine = from.line;
if (mode == null) {
if (cm.uncomment(from, to, options)) mode = "un";
else { cm.lineComment(from, to, options); mode = "line";
}
} else if (mode == "un") {
cm.uncomment(from, to, options);
} else {
cm.lineComment(from, to, options);
}
}
});
// Rough heuristic to try and detect lines that are part of multi-line
string
function probablyInsideString(cm, pos, line) {
return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0)))
&& !/^[\'\"\`]/.test(line)
}
function getMode(cm, pos) {
var mode = cm.getMode()
return mode.useInnerComments === false || !mode.innerMode ? mode :
cm.getModeAt(pos)
}
CodeMirror.defineExtension("lineComment", function(from, to,
options) {
if (!options) options = noOptions;
var self = this, mode = getMode(self, from);
var firstLine = self.getLine(from.line);
if (firstLine == null || probablyInsideString(self, from, firstLine))
return;
var commentString = options.lineComment || mode.lineComment;
if (!commentString) {
if (options.blockCommentStart || mode.blockCommentStart) {
options.fullLines = true;
self.blockComment(from, to, options);
}
return;
}
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 :
to.line, self.lastLine() + 1);
var pad = options.padding == null ? " " : options.padding;
var blankLines = options.commentBlankLines || from.line == to.line;
self.operation(function() {
if (options.indent) {
var baseString = null;
for (var i = from.line; i < end; ++i) {
var line = self.getLine(i);
var whitespace = line.slice(0, firstNonWS(line));
if (baseString == null || baseString.length >
whitespace.length) {
baseString = whitespace;
}
}
for (var i = from.line; i < end; ++i) {
var line = self.getLine(i), cut = baseString.length;
if (!blankLines && !nonWS.test(line)) continue;
if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
self.replaceRange(baseString + commentString + pad, Pos(i, 0),
Pos(i, cut));
}
} else {
for (var i = from.line; i < end; ++i) {
if (blankLines || nonWS.test(self.getLine(i)))
self.replaceRange(commentString + pad, Pos(i, 0));
}
}
});
});
CodeMirror.defineExtension("blockComment", function(from, to,
options) {
if (!options) options = noOptions;
var self = this, mode = getMode(self, from);
var startString = options.blockCommentStart || mode.blockCommentStart;
var endString = options.blockCommentEnd || mode.blockCommentEnd;
if (!startString || !endString) {
if ((options.lineComment || mode.lineComment) &&
options.fullLines != false)
self.lineComment(from, to, options);
return;
}
if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return
var end = Math.min(to.line, self.lastLine());
if (end != from.line && to.ch == 0 &&
nonWS.test(self.getLine(end))) --end;
var pad = options.padding == null ? " " : options.padding;
if (from.line > end) return;
self.operation(function() {
if (options.fullLines != false) {
var lastLineHasText = nonWS.test(self.getLine(end));
self.replaceRange(pad + endString, Pos(end));
self.replaceRange(startString + pad, Pos(from.line, 0));
var lead = options.blockCommentLead || mode.blockCommentLead;
if (lead != null) for (var i = from.line + 1; i <= end; ++i)
if (i != end || lastLineHasText)
self.replaceRange(lead + pad, Pos(i, 0));
} else {
self.replaceRange(endString, to);
self.replaceRange(startString, from);
}
});
});
CodeMirror.defineExtension("uncomment", function(from, to,
options) {
if (!options) options = noOptions;
var self = this, mode = getMode(self, from);
var end = Math.min(to.ch != 0 || to.line == from.line ? to.line :
to.line - 1, self.lastLine()), start = Math.min(from.line, end);
// Try finding line comments
var lineString = options.lineComment || mode.lineComment, lines = [];
var pad = options.padding == null ? " " : options.padding,
didSomething;
lineComment: {
if (!lineString) break lineComment;
for (var i = start; i <= end; ++i) {
var line = self.getLine(i);
var found = line.indexOf(lineString);
if (found > -1 &&
!/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
if (found == -1 && nonWS.test(line)) break lineComment;
if (found > -1 && nonWS.test(line.slice(0, found)))
break lineComment;
lines.push(line);
}
self.operation(function() {
for (var i = start; i <= end; ++i) {
var line = lines[i - start];
var pos = line.indexOf(lineString), endPos = pos +
lineString.length;
if (pos < 0) continue;
if (line.slice(endPos, endPos + pad.length) == pad) endPos +=
pad.length;
didSomething = true;
self.replaceRange("", Pos(i, pos), Pos(i, endPos));
}
});
if (didSomething) return true;
}
// Try block comments
var startString = options.blockCommentStart || mode.blockCommentStart;
var endString = options.blockCommentEnd || mode.blockCommentEnd;
if (!startString || !endString) return false;
var lead = options.blockCommentLead || mode.blockCommentLead;
var startLine = self.getLine(start), open =
startLine.indexOf(startString)
if (open == -1) return false
var endLine = end == start ? startLine : self.getLine(end)
var close = endLine.indexOf(endString, end == start ? open +
startString.length : 0);
var insideStart = Pos(start, open + 1), insideEnd = Pos(end, close + 1)
if (close == -1 ||
!/comment/.test(self.getTokenTypeAt(insideStart)) ||
!/comment/.test(self.getTokenTypeAt(insideEnd)) ||
self.getRange(insideStart, insideEnd,
"\n").indexOf(endString) > -1)
return false;
// Avoid killing block comments completely outside the selection.
// Positions of the last startString before the start of the selection,
and the first endString after it.
var lastStart = startLine.lastIndexOf(startString, from.ch);
var firstEnd = lastStart == -1 ? -1 : startLine.slice(0,
from.ch).indexOf(endString, lastStart + startString.length);
if (lastStart != -1 && firstEnd != -1 && firstEnd +
endString.length != from.ch) return false;
// Positions of the first endString after the end of the selection, and
the last startString before it.
firstEnd = endLine.indexOf(endString, to.ch);
var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString,
firstEnd - to.ch);
lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch +
almostLastStart;
if (firstEnd != -1 && lastStart != -1 && lastStart !=
to.ch) return false;
self.operation(function() {
self.replaceRange("", Pos(end, close - (pad &&
endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),
Pos(end, close + endString.length));
var openEnd = open + startString.length;
if (pad && startLine.slice(openEnd, openEnd + pad.length) ==
pad) openEnd += pad.length;
self.replaceRange("", Pos(start, open), Pos(start,
openEnd));
if (lead) for (var i = start + 1; i <= end; ++i) {
var line = self.getLine(i), found = line.indexOf(lead);
if (found == -1 || nonWS.test(line.slice(0, found))) continue;
var foundEnd = found + lead.length;
if (pad && line.slice(foundEnd, foundEnd + pad.length) ==
pad) foundEnd += pad.length;
self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
}
});
return true;
});
});
PK�c�[�j���comment.min.jsnu�[���!(function(a){"object"==typeof
exports&&"object"==typeof
module?a(require("../../lib/codemirror")):"function"==typeof
define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})((function(a){"use
strict";function b(a){var b=a.search(f);return-1==b?0:b}function
c(a,b,c){return/\bstring\b/.test(a.getTokenTypeAt(g(b.line,0)))&&!/^[\'\"\`]/.test(c)}function
d(a,b){var
c=a.getMode();return!1!==c.useInnerComments&&c.innerMode?a.getModeAt(b):c}var
e={},f=/[^\s\u00a0]/,g=a.Pos;a.commands.toggleComment=function(a){a.toggleComment()},a.defineExtension("toggleComment",(function(a){a||(a=e);for(var
b=this,c=1/0,d=this.listSelections(),f=null,h=d.length-1;h>=0;h--){var
i=d[h].from(),j=d[h].to();i.line>=c||(j.line>=c&&(j=g(c,0)),c=i.line,null==f?b.uncomment(i,j,a)?f="un":(b.lineComment(i,j,a),f="line"):"un"==f?b.uncomment(i,j,a):b.lineComment(i,j,a))}})),a.defineExtension("lineComment",(function(a,h,i){i||(i=e);var
j=this,k=d(j,a),l=j.getLine(a.line);if(null!=l&&!c(j,a,l)){var
m=i.lineComment||k.lineComment;if(!m)return
void((i.blockCommentStart||k.blockCommentStart)&&(i.fullLines=!0,j.blockComment(a,h,i)));var
n=Math.min(0!=h.ch||h.line==a.line?h.line+1:h.line,j.lastLine()+1),o=null==i.padding?"
":i.padding,p=i.commentBlankLines||a.line==h.line;j.operation((function(){if(i.indent){for(var
c=null,d=a.line;d<n;++d){var
e=j.getLine(d),h=e.slice(0,b(e));(null==c||c.length>h.length)&&(c=h)}for(var
d=a.line;d<n;++d){var
e=j.getLine(d),k=c.length;(p||f.test(e))&&(e.slice(0,k)!=c&&(k=b(e)),j.replaceRange(c+m+o,g(d,0),g(d,k)))}}else
for(var
d=a.line;d<n;++d)(p||f.test(j.getLine(d)))&&j.replaceRange(m+o,g(d,0))}))}})),a.defineExtension("blockComment",(function(a,b,c){c||(c=e);var
h=this,i=d(h,a),j=c.blockCommentStart||i.blockCommentStart,k=c.blockCommentEnd||i.blockCommentEnd;if(!j||!k)return
void((c.lineComment||i.lineComment)&&0!=c.fullLines&&h.lineComment(a,b,c));if(!/\bcomment\b/.test(h.getTokenTypeAt(g(a.line,0)))){var
l=Math.min(b.line,h.lastLine());l!=a.line&&0==b.ch&&f.test(h.getLine(l))&&--l;var
m=null==c.padding?"
":c.padding;a.line>l||h.operation((function(){if(0!=c.fullLines){var
d=f.test(h.getLine(l));h.replaceRange(m+k,g(l)),h.replaceRange(j+m,g(a.line,0));var
e=c.blockCommentLead||i.blockCommentLead;if(null!=e)for(var
n=a.line+1;n<=l;++n)(n!=l||d)&&h.replaceRange(e+m,g(n,0))}else
h.replaceRange(k,b),h.replaceRange(j,a)}))}})),a.defineExtension("uncomment",(function(a,b,c){c||(c=e);var
h,i=this,j=d(i,a),k=Math.min(0!=b.ch||b.line==a.line?b.line:b.line-1,i.lastLine()),l=Math.min(a.line,k),m=c.lineComment||j.lineComment,n=[],o=null==c.padding?"
":c.padding;a:if(m){for(var p=l;p<=k;++p){var
q=i.getLine(p),r=q.indexOf(m);if(r>-1&&!/comment/.test(i.getTokenTypeAt(g(p,r+1)))&&(r=-1),-1==r&&f.test(q))break
a;if(r>-1&&f.test(q.slice(0,r)))break
a;n.push(q)}if(i.operation((function(){for(var a=l;a<=k;++a){var
b=n[a-l],c=b.indexOf(m),d=c+m.length;c<0||(b.slice(d,d+o.length)==o&&(d+=o.length),h=!0,i.replaceRange("",g(a,c),g(a,d)))}})),h)return!0}var
s=c.blockCommentStart||j.blockCommentStart,t=c.blockCommentEnd||j.blockCommentEnd;if(!s||!t)return!1;var
u=c.blockCommentLead||j.blockCommentLead,v=i.getLine(l),w=v.indexOf(s);if(-1==w)return!1;var
x=k==l?v:i.getLine(k),y=x.indexOf(t,k==l?w+s.length:0),z=g(l,w+1),A=g(k,y+1);if(-1==y||!/comment/.test(i.getTokenTypeAt(z))||!/comment/.test(i.getTokenTypeAt(A))||i.getRange(z,A,"\n").indexOf(t)>-1)return!1;var
B=v.lastIndexOf(s,a.ch),C=-1==B?-1:v.slice(0,a.ch).indexOf(t,B+s.length);if(-1!=B&&-1!=C&&C+t.length!=a.ch)return!1;C=x.indexOf(t,b.ch);var
D=x.slice(b.ch).lastIndexOf(s,C-b.ch);return
B=-1==C||-1==D?-1:b.ch+D,(-1==C||-1==B||B==b.ch)&&(i.operation((function(){i.replaceRange("",g(k,y-(o&&x.slice(y-o.length,y)==o?o.length:0)),g(k,y+t.length));var
a=w+s.length;if(o&&v.slice(a,a+o.length)==o&&(a+=o.length),i.replaceRange("",g(l,w),g(l,a)),u)for(var
b=l+1;b<=k;++b){var
c=i.getLine(b),d=c.indexOf(u);if(-1!=d&&!f.test(c.slice(0,d))){var
e=d+u.length;o&&c.slice(e,e+o.length)==o&&(e+=o.length),i.replaceRange("",g(b,d),g(b,e))}}})),!0)}))}));PK�c�[v�m!��continuecomment.jsnu�[���//
CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module ==
"object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) //
AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
var nonspace = /\S/g;
var repeat = String.prototype.repeat || function (n) { return Array(n +
1).join(this); };
function continueComment(cm) {
if (cm.getOption("disableInput")) return CodeMirror.Pass;
var ranges = cm.listSelections(), mode, inserts = [];
for (var i = 0; i < ranges.length; i++) {
var pos = ranges[i].head
if (!/\bcomment\b/.test(cm.getTokenTypeAt(pos))) return
CodeMirror.Pass;
var modeHere = cm.getModeAt(pos)
if (!mode) mode = modeHere;
else if (mode != modeHere) return CodeMirror.Pass;
var insert = null, line, found;
var blockStart = mode.blockCommentStart, lineCmt = mode.lineComment;
if (blockStart && mode.blockCommentContinue) {
line = cm.getLine(pos.line);
var end = line.lastIndexOf(mode.blockCommentEnd, pos.ch -
mode.blockCommentEnd.length);
// 1. if this block comment ended
// 2. if this is actually inside a line comment
if (end != -1 && end == pos.ch -
mode.blockCommentEnd.length ||
lineCmt && (found = line.lastIndexOf(lineCmt, pos.ch -
1)) > -1 &&
/\bcomment\b/.test(cm.getTokenTypeAt({line: pos.line, ch: found
+ 1}))) {
// ...then don't continue it
} else if (pos.ch >= blockStart.length &&
(found = line.lastIndexOf(blockStart, pos.ch -
blockStart.length)) > -1 &&
found > end) {
// reuse the existing leading spaces/tabs/mixed
// or build the correct indent using CM's tab/indent options
if (nonspaceAfter(0, line) >= found) {
insert = line.slice(0, found);
} else {
var tabSize = cm.options.tabSize, numTabs;
found = CodeMirror.countColumn(line, found, tabSize);
insert = !cm.options.indentWithTabs ? repeat.call("
", found) :
repeat.call("\t", (numTabs = Math.floor(found /
tabSize))) +
repeat.call(" ", found - tabSize * numTabs);
}
} else if ((found = line.indexOf(mode.blockCommentContinue)) >
-1 &&
found <= pos.ch &&
found <= nonspaceAfter(0, line)) {
insert = line.slice(0, found);
}
if (insert != null) insert += mode.blockCommentContinue
}
if (insert == null && lineCmt &&
continueLineCommentEnabled(cm)) {
if (line == null) line = cm.getLine(pos.line);
found = line.indexOf(lineCmt);
// cursor at pos 0, line comment also at pos 0 => shift it down,
don't continue
if (!pos.ch && !found) insert = "";
// continue only if the line starts with an optional space + line
comment
else if (found > -1 && nonspaceAfter(0, line) >=
found) {
// don't continue if there's only space(s) after cursor
or the end of the line
insert = nonspaceAfter(pos.ch, line) > -1;
// but always continue if the next line starts with a line
comment too
if (!insert) {
var next = cm.getLine(pos.line + 1) || '',
nextFound = next.indexOf(lineCmt);
insert = nextFound > -1 && nonspaceAfter(0, next)
>= nextFound || null;
}
if (insert) {
insert = line.slice(0, found) + lineCmt +
line.slice(found + lineCmt.length).match(/^\s*/)[0];
}
}
}
if (insert == null) return CodeMirror.Pass;
inserts[i] = "\n" + insert;
}
cm.operation(function() {
for (var i = ranges.length - 1; i >= 0; i--)
cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(),
"+insert");
});
}
function nonspaceAfter(ch, str) {
nonspace.lastIndex = ch;
var m = nonspace.exec(str);
return m ? m.index : -1;
}
function continueLineCommentEnabled(cm) {
var opt = cm.getOption("continueComments");
if (opt && typeof opt == "object")
return opt.continueLineComment !== false;
return true;
}
CodeMirror.defineOption("continueComments", null, function(cm,
val, prev) {
if (prev && prev != CodeMirror.Init)
cm.removeKeyMap("continueComment");
if (val) {
var key = "Enter";
if (typeof val == "string")
key = val;
else if (typeof val == "object" && val.key)
key = val.key;
var map = {name: "continueComment"};
map[key] = continueComment;
cm.addKeyMap(map);
}
});
});
PK�c�[f�����continuecomment.min.jsnu�[���!(function(a){"object"==typeof
exports&&"object"==typeof
module?a(require("../../lib/codemirror")):"function"==typeof
define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})((function(a){function
b(b){if(b.getOption("disableInput"))return a.Pass;for(var
e,g=b.listSelections(),h=[],i=0;i<g.length;i++){var
j=g[i].head;if(!/\bcomment\b/.test(b.getTokenTypeAt(j)))return a.Pass;var
k=b.getModeAt(j);if(e){if(e!=k)return a.Pass}else e=k;var
l,m,n=null,o=e.blockCommentStart,p=e.lineComment;if(o&&e.blockCommentContinue){l=b.getLine(j.line);var
q=l.lastIndexOf(e.blockCommentEnd,j.ch-e.blockCommentEnd.length);if(-1!=q&&q==j.ch-e.blockCommentEnd.length||p&&(m=l.lastIndexOf(p,j.ch-1))>-1&&/\bcomment\b/.test(b.getTokenTypeAt({line:j.line,ch:m+1})));else
if(j.ch>=o.length&&(m=l.lastIndexOf(o,j.ch-o.length))>-1&&m>q)if(c(0,l)>=m)n=l.slice(0,m);else{var
r,s=b.options.tabSize;m=a.countColumn(l,m,s),n=b.options.indentWithTabs?f.call("\t",r=Math.floor(m/s))+f.call("
",m-s*r):f.call("
",m)}else(m=l.indexOf(e.blockCommentContinue))>-1&&m<=j.ch&&m<=c(0,l)&&(n=l.slice(0,m));null!=n&&(n+=e.blockCommentContinue)}if(null==n&&p&&d(b))if(null==l&&(l=b.getLine(j.line)),m=l.indexOf(p),j.ch||m){if(m>-1&&c(0,l)>=m){if(!(n=c(j.ch,l)>-1)){var
t=b.getLine(j.line+1)||"",u=t.indexOf(p);n=u>-1&&c(0,t)>=u||null}n&&(n=l.slice(0,m)+p+l.slice(m+p.length).match(/^\s*/)[0])}}else
n="";if(null==n)return
a.Pass;h[i]="\n"+n}b.operation((function(){for(var
a=g.length-1;a>=0;a--)b.replaceRange(h[a],g[a].from(),g[a].to(),"+insert")}))}function
c(a,b){e.lastIndex=a;var c=e.exec(b);return c?c.index:-1}function d(a){var
b=a.getOption("continueComments");return!b||"object"!=typeof
b||!1!==b.continueLineComment}var
e=/\S/g,f=String.prototype.repeat||function(a){return
Array(a+1).join(this)};a.defineOption("continueComments",null,(function(c,d,e){if(e&&e!=a.Init&&c.removeKeyMap("continueComment"),d){var
f="Enter";"string"==typeof
d?f=d:"object"==typeof d&&d.key&&(f=d.key);var
g={name:"continueComment"};g[f]=b,c.addKeyMap(g)}}))}));PK�D�[�#o,,
index.htmlnu�[���PK�D�[秃���fsubmitbutton.jsnu�[���PK�D�[��u55�tmpl/default.phpnu�[���PK�D�[�Y���tmpl/default.xmlnu�[���PK�D�[�#o,,=tmpl/index.htmlnu�[���PK�D�[*I��VV
�view.html.phpnu�[���PK�c�[[��6"#"#
;'comment.jsnu�[���PK�c�[�j����Jcomment.min.jsnu�[���PK�c�[v�m!���Zcontinuecomment.jsnu�[���PK�c�[f������mcontinuecomment.min.jsnu�[���PK
�u