81
urbanspacema
Re: jquery admin side, debug problem

I try your version otherwise I put the js in the php file
http://www.ultrasonica.it
http://www.noisecollective.net



82
urbanspacema
Re: jquery admin side, debug problem

another question
in the file format.php i have many $variables that I would go to the javascript file jquery.mie.js for checking errors with cycles of IF.

I tried to assign a variable in the file format.php
$exist = "foo";

and called in javascript with this
var exist = ( '<? php echo "$exist";?>');

But it does not work...

at this time sending from file format.php to js file a variable $fid...

any idea?
tnx a lot
Urban
http://www.ultrasonica.it
http://www.noisecollective.net



83
urbanspacema
Re: jquery admin side, debug problem

Ok, work perfectly...
Unfortunately, so you can use the debugging with ajax ... Perhaps in future versions of XOOPS this thing can be corrected?
http://www.ultrasonica.it
http://www.noisecollective.net



84
urbanspacema
Re: jquery admin side, debug problem

tnx catz and trabis.
Trabis This code must be placed in my file format.pho right?
http://www.ultrasonica.it
http://www.noisecollective.net



85
urbanspacema
jquery admin side, debug problem

Hello fellow developer!
I'm working on a new module (quiet calm are just the beginning) but I need a hand.

In Admin Side,i'm doing a form that inserts a field in a table and I'm doing with jQuery, and now it works. Unfortunately, if active XOOPS debugging the ajax does not work anymore.

This is the code of the page format.php
<?php
include 'header.php';
if(isset(
$_GET['delete']))
{    
$sql 'DELETE FROM '.$xoopsDB->prefix('umus_format').' WHERE format_id = '.(int)$_GET['delete'];
    
$result $xoopsDB->queryF($sql);
    if(isset(
$_GET['ajax'])&&$_GET['ajax']==1)
        exit();
}
if (
$_REQUEST[fname] != ""){ 
    
$fname        htmlspecialchars(trim($_REQUEST['fname']));
    
$sql_insert "INSERT INTO ".$xoopsDB->prefix("umus_format")."(format_title) VALUES ('".$fname."')";
    
$result_insert $xoopsDB->queryF($sql_insert);
    
    
$fid $xoopsDB->getInsertId();
    echo 
$fid;
    exit();
    }

xoops_cp_header();
loadModuleAdminMenu(1"");
    
//includo js e css
include ('../include/library.php');

//per tutti i casi abilito il textsanitizer
$myts =& MyTextSanitizer::getInstance();
if (isset(
$_GET)) {
   foreach (
$_GET as $k => $v) {
      if(!isset($
$k))
          $
$k $v;
   }
}

if (isset(
$_POST)) {
   foreach (
$_POST as $k => $v) {
      if(!isset($
$k))
          $
$k $v;
   }
}
?>    
    <form id="submit" method="post">
        <fieldset style='height:45px;'>
        <legend>Inserisci nuovo formato</legend>
        <label for="fname">Formato:</label>
            <input id="fname" class="text" name="fname" size="20" type="text" /><div class='success'>Formato inserito con successo.</div>
            <button class="button positive">Aggiungi</button>
        </fieldset>
    </form>

<?php
    
echo "<table class='stripeMe' id='tablist'>
            <th colspan='4'>"
._MI_UMUS_LISTFORMAT."</th>
            <tr class='head'><td>"
._MI_UMUS_FORMAT_TITLE."</td><td width='150'>"._MI_UMUS_ACTION."</td></tr>";
            
$sql 'SELECT * FROM '.$xoopsDB->prefix('umus_format').' ORDER BY format_title ';
            
$result $xoopsDB->queryF($sql);
    while(
$row mysql_fetch_array($result))
            {
    echo 
'<tr class="record" id="record-',$row['format_id'],'">
            <td><strong>'
.$row['format_title'].'</strong></td>
            <td text-align="center"><a href="?delete='
.$row['format_id'].'" class="delete" ><img src="../images/del.png" alt="'._MI_UMUS_DELETE.'" /></a>
            </td>
            </tr>'
;
            }
    echo 
"</table>";
    
xoops_cp_footer();
?>


library.php
<link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="../css/umusic.css" />
<
script type="text/javascript" src="../library/jquery-1.3.2.min.js"></script>
<
script type="text/javascript" src="../library/jquery.confirm.js"></script>
<
script type="text/javascript" src="../library/jquery.mie.js"></script>
<
script type="text/javascript" src="../library/jquery.color.js"></script>


jquery.mie.js (my script)

//cancello un formato
$(document).ready(function() {
    $(
'a.delete').click(function(e) {
        
e.preventDefault();
        
//var parent = $(this).parent();
        
var parent = $(this).parent("td").parent("tr");
        {
        $.
ajax({
            
type'get',
            
url'format.php',
            
data'ajax=1&delete=' parent.attr('id').replace('record-',''),
            
success: function() {
                
parent.fadeOut(500,function() {
                
parent.remove();
                });
            }
        });
    }
    }).
confirm();
});

//stripe table
$(document).ready(function(){
    
    $(
'.stripeMe tr').mouseover(function(){
        $(
this).addClass("over");
    });
    
    $(
'.stripeMe tr').mouseout(function(){
        $(
this).removeClass("over");
    });
    
    $(
'.stripeMe tr:even').addClass('alt');

});

//creo un nuovo formato
    
$(document).ready(function(){
    $(
'form#submit').submit(function() {
    
    
// we want to store the values from the form input box, then send via ajax below
    
var fname  = $('#fname').attr('value');
    if (
fname != "") {
    
         $.
ajax({
            
type'post',
            
dataType'text',
            
url'format.php',
            
data'fname='fname,
            
success: function(fid){
                $(
'div.success').fadeIn(1000);
                $(
'div.success').fadeOut(3000);
                $(
'table#tablist').append("<tr class='record' id='record-"+fid+"' style='background-color:#ff6666; color:#ffffff;'><td><strong>"+fname+"</strong></td><td text-align='center'><a href='?delete="+fid+"' class='delete'><img src='../images/del.png' alt='Delete' /></a></td></tr>");                
                
            
                
                $(
'a.delete').click(function(e) {
                
e.preventDefault();
                
//var parent = $(this).parent();
                
var parent = $(this).parent("td").parent("tr");
                {
                $.
ajax({
                
type'get',
                
url'format.php',
                
data'ajax=1&delete=' parent.attr('id').replace('record-',''),
                
success: function() {
                
parent.fadeOut(500,function() {
                
parent.remove();
                });
            }
        });
    }
    }).
confirm();
    
}
});
}
    return 
false;
    });
});

http://www.ultrasonica.it
http://www.noisecollective.net



86
urbanspacema
Re: Main Menu Re styiling

change this

#mainmenu a {
 
display:block;
 
margin 0;
 
background-color #e6e6e6;    
 
padding 4px;
}

/*in this*/
#mainmenu a {
 
display:block;
 
margin 0;
 
background-color #e6e6e6;    
 
padding 4px;
 
margin-bottom:-12px;
}



tested in ff, to do something better should have the menu's html
http://www.ultrasonica.it
http://www.noisecollective.net



87
urbanspacema
Re: 2009 XOOPS Website Redesign

Guys at THIS LINK
I show my Idea for new xoops.org design.


In my opinion, it is important to give a new look at xoops.org (in addition to reorganize the contents of course) to encourage new users. Honestly I think that the site should be a concentrate of all what XOOPS can do, to offer to those who has never used a comprehensive view of what is XOOPS.

Talking with some colleagues I realized that at the same benefits (even I do not know well) Joomla has more users because it is immediately appealing. What's more, there was certainly a marketing study that has driven joomla more about than other even better CMS.

I am fond of XOOPS and not changing my cms, and are willing to give my contribution (for graphics) if you like.

Urban
(sorry for bad english! )
http://www.ultrasonica.it
http://www.noisecollective.net



88
urbanspacema
Re: add jQuery library on xoops core

I'm using jQuery for the administrative part of a module I'm trying to build. It would be useful to have jQuery integrated in XOOPS
http://www.ultrasonica.it
http://www.noisecollective.net



89
urbanspacema
Re: New module: Timeline

Nice work kaotik!
It's ideal for Curriculum... or historical news..

tnx
http://www.ultrasonica.it
http://www.noisecollective.net



90
urbanspacema
Re: XOOPS 2.3.3 Final Issues

In 2.3.3 finale release
there is still a problem on mp3 extension in mytextsanitizer

solution is here


is very important to update this little bug.
Urban


http://www.ultrasonica.it
http://www.noisecollective.net




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 19 »



Login

Who's Online

242 user(s) are online (168 user(s) are browsing Support Forums)


Members: 0


Guests: 242


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits